GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Feat: client side metrics by milaGGL · Pull Request #1840 · googleapis/java-firestore

This repository was archived by the owner on Aug 30, 2026. It is now read-only.

Conversation

@milaGGL

@milaGGL milaGGL commented Sep 19, 2024 •
edited by MarkDuckworth
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor
  • Integrate Opentelemetry API and SDK into the Firestore SDK
  • Implement BuiltinMetricsProvider class to collect 4 GAX layer and 4 SDK layer metrics
  • Integrate GoogleCloudMetricExporter to export metrics data to CloudMonitoring custom.googleapis.com namespace (Waiting for BE setup)
  • Create public API to enable/disable client side metrics (the API is set to private, and disaled for now.)

BEGIN_COMMIT_OVERRIDE
refactor: client side metrics implementation
END_COMMIT_OVERRIDE

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
milaGGL added 13 commits August 14, 2024 17:09
@milaGGL
enable 4 metrics from GAX
30a7011
@milaGGL
format
ed85413
@milaGGL
add default otel
57084c4
@milaGGL
format
571c095
@milaGGL
move constants out
f4b8416
@milaGGL
format
da0fe82
@milaGGL
add additional attributes
61432eb
@milaGGL
Merge branch 'main' into mila/client-side-metrics-demo
b5bfe5c
@milaGGL
add attributes to gax metrics
f0a029d
@milaGGL
Update BuiltinMetricsConstants.java
5456038
@milaGGL
remove current metrics implementation
5efaba6
@milaGGL
add custom exporter, add latency recorder
c0b4cc1
@milaGGL
use 2 otel instances
3979331
@product-auto-label product-auto-label Bot added size: l Pull request size is large. api: firestore Issues related to the googleapis/java-firestore API. labels Sep 19, 2024
@milaGGL
set custom apiTracerFactory to gax
a9d08b5
@product-auto-label product-auto-label Bot added size: xl Pull request size is extra large. and removed size: l Pull request size is large. labels Sep 20, 2024
milaGGL added 7 commits September 23, 2024 12:15
@milaGGL
Merge branch 'main' into mila/client-side-metrics-demo2
029bd8c
@milaGGL
fix opentelemtry dependency version conflict issue
50e05fb
@milaGGL
use enabled/disabled style
53cd48a
@milaGGL
modify access modifiers
7adb9d6
@milaGGL
format
690e4ee
@milaGGL
rename boolean
e6f8ba6
@milaGGL
Merge branch 'main' into mila/client-side-metrics-demo2
c4ca4ae
milaGGL
milaGGL commented Sep 27, 2024
View reviewed changes
Comment thread ...ud-firestore/src/main/java/com/google/cloud/firestore/telemetry/BuiltinMetricsConstants.java Outdated
static final String FIRESTORE_LIBRARY_NAME = "firestore_java";

// TODO: change to firestore.googleapis.com
public static final String METER_NAME = "custom.googleapis.com/internal/client";

@milaGGL milaGGL Sep 27, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opentelemetry uses dot separation in metrics naming, while monarch uses slash separation. exporting the built-in metrics to other backends might raise naming conflict.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@milaGGL milaGGL Sep 27, 2024

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we could have named the metrics with dot seperation, use view to reformat it with slash separation in the default OTEL instance for monarch. But the metrics from Gax uses slash already, using dot separation inside firestore doesn't solves the problem.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
cloud-java-bot and others added 4 commits September 27, 2024 19:27
@cloud-java-bot
chore: generate libraries at Fri Sep 27 19:25:02 UTC 2024
887221d
@milaGGL
Update pom.xml
a2c715a
@milaGGL
resolve comments from proto
ed78182
@milaGGL
e2E latency for runTransaction
e0d46be
@milaGGL
Update BuiltinMetricsProvider.java
1999ff7
ehsannas
ehsannas reviewed Oct 11, 2024
View reviewed changes

@ehsannas ehsannas left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work @milaGGL. A few minor comments/nits below.

I'd like us to disable the feature and land this PR

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread ...e-cloud-firestore/src/main/java/com/google/cloud/firestore/telemetry/TelemetryConstants.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread ...e-cloud-firestore/src/main/java/com/google/cloud/firestore/telemetry/TelemetryConstants.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread google-cloud-firestore/src/main/java/com/google/cloud/firestore/telemetry/ClientIdentifier.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread google-cloud-firestore/src/main/java/com/google/cloud/firestore/telemetry/ClientIdentifier.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread google-cloud-firestore/src/main/java/com/google/cloud/firestore/FirestoreOptions.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread ...oud-firestore/src/main/java/com/google/cloud/firestore/telemetry/BuiltinMetricsProvider.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread ...e-cloud-firestore/src/main/java/com/google/cloud/firestore/telemetry/EnabledMetricsUtil.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread ...e-cloud-firestore/src/main/java/com/google/cloud/firestore/telemetry/EnabledMetricsUtil.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread ...e-cloud-firestore/src/main/java/com/google/cloud/firestore/telemetry/EnabledMetricsUtil.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread google-cloud-firestore/src/main/java/com/google/cloud/firestore/telemetry/MetricsUtil.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

milaGGL added 6 commits October 16, 2024 12:34
@milaGGL
Merge branch 'main' into mila/client-side-metrics-demo2
81e349b
@milaGGL
resolve comments
f4e36d9
@milaGGL
Update pom.xml
05e8efb
@milaGGL
remove duplicated tracing dependency
b0b1687
@milaGGL
add opentelemetry-sdk-metrics dependency
4abbcf0
@milaGGL
adjust end-to-end latency in streaming queries
328855d
milaGGL
milaGGL commented Oct 21, 2024
View reviewed changes
Comment thread google-cloud-firestore/src/main/java/com/google/cloud/firestore/StreamableQuery.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

@milaGGL milaGGL assigned ehsannas and unassigned milaGGL Oct 21, 2024
@milaGGL
milaGGL requested a review from ehsannas October 21, 2024 15:20
milaGGL
milaGGL commented Oct 21, 2024
View reviewed changes
Comment thread google-cloud-firestore/clirr-ignored-differences.xml Resolved

Uh oh!

There was an error while loading. Please reload this page.

@milaGGL
fix clirr error
5e1fb4b
milaGGL
milaGGL commented Oct 23, 2024
View reviewed changes
Comment thread google-cloud-firestore/src/main/java/com/google/cloud/firestore/telemetry/MetricsUtil.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

@milaGGL
add exportBuiltinMetricsToGoogleCloudMonitoring flag
4fa8874
milaGGL
milaGGL commented Oct 23, 2024
View reviewed changes
Comment thread google-cloud-firestore/clirr-ignored-differences.xml
</difference>

<!-- Change the parameter type of internalStream function -->
<difference>

@milaGGL milaGGL Oct 23, 2024

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

waiting for #1896 to lift the clirr alert

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@ehsannas ehsannas Oct 29, 2024

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe the decision for #1896 was to use internalApi rather than making the class package-private. So we'll need to keep this clirr change as well.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@milaGGL milaGGL Oct 30, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

they are changing the internalStreamfrom protected to default . So it would affect the public access of that method, which could remove the need to add clirr for the parameter change.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
ehsannas
ehsannas reviewed Oct 28, 2024
View reviewed changes

@ehsannas ehsannas left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Only nit is to add a test to verify the behavior of MonitoredStreamResponseObserver in face of a retryable or non-retryable error.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread google-cloud-firestore/src/main/java/com/google/cloud/firestore/StreamableQuery.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread google-cloud-firestore/src/main/java/com/google/cloud/firestore/StreamableQuery.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

@milaGGL
Merge branch 'main' into mila/client-side-metrics-demo2
7deb0d6
ehsannas
ehsannas approved these changes Oct 29, 2024
View reviewed changes
@milaGGL
Merge branch 'main' into mila/client-side-metrics-demo2
637f878
@milaGGL milaGGL assigned milaGGL and unassigned ehsannas Nov 4, 2024
milaGGL added 2 commits November 4, 2024 13:04
@milaGGL
Update clirr-ignored-differences.xml
8480fa8
@milaGGL
add internalStream clirr change back
ef9baa8
@milaGGL
milaGGL merged commit 77763c0 into main Nov 5, 2024
@milaGGL
milaGGL deleted the mila/client-side-metrics-demo2 branch November 5, 2024 17:49
@release-please release-please Bot mentioned this pull request Nov 5, 2024
chore(main): release 3.29.0 #1919
Merged
@MarkDuckworth MarkDuckworth added the release-please:force-run To run release-please label Nov 5, 2024
@release-please release-please Bot removed the release-please:force-run To run release-please label Nov 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

1 more reviewer
@ehsannas ehsannas ehsannas approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@milaGGL milaGGL

Labels

api: firestore Issues related to the googleapis/java-firestore API. size: xl Pull request size is extra large.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@milaGGL @ehsannas @MarkDuckworth @cloud-java-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.