Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Adding gfe_latencies metric to built-in metrics #3490

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

surbhigarg92
Copy link
Contributor

No description provided.

@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: spanner Issues related to the googleapis/java-spanner API. labels Nov 20, 2024
@surbhigarg92 surbhigarg92 force-pushed the gfe_latency branch 2 times, most recently from 085d5b8 to 7383362 Compare November 20, 2024 09:08
TagContext tagContext,
Attributes attributes,
Span span,
Map<String, String> builtInMetricsAttributes) {
MeasureMap measureMap = STATS_RECORDER.newMeasureMap();
String serverTiming = metadata.get(SERVER_TIMING_HEADER_KEY);
if (serverTiming != null && serverTiming.startsWith(SERVER_TIMING_HEADER_PREFIX)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we make this compatible with other server timing headers?

Copy link
Contributor

Choose a reason for hiding this comment

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

More specifically, a server timing header is in the format of [component]; dur=[latency], as stated in the w3c standard. gfet4t7 is just one of the possible component and it is not guaranteed to be the first one, so startsWith shall be changed to something like contains.

@product-auto-label product-auto-label bot added size: l Pull request size is large. and removed size: m Pull request size is medium. labels Jan 3, 2025
@surbhigarg92 surbhigarg92 changed the title Adding gfe_latencies metric to built-in metrics feat: Adding gfe_latencies metric to built-in metrics Jan 7, 2025
@surbhigarg92 surbhigarg92 added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner Issues related to the googleapis/java-spanner API. do not merge Indicates a pull request not ready for merge, due to either quality or timing. size: l Pull request size is large.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants