-
Couldn't load subscription status.
- Fork 135
feat: [Internal] client-side metrics for afe latency and connectivity error #3819
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
Changes from all commits
9d2421b
0f9c7f8
af74423
0bf8f4c
ac22e7c
128d325
74ad439
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -689,6 +689,10 @@ private static boolean isEmulatorEnabled(SpannerOptions options, String emulator | |
| && options.getHost().endsWith(emulatorHost); | ||
| } | ||
|
|
||
| public static boolean isEnableAFEServerTiming() { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: why are we not using SpannerOptions? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This feature can only be disabled using ENV . |
||
| return "false".equalsIgnoreCase(System.getenv("SPANNER_DISABLE_AFE_SERVER_TIMING")); | ||
| } | ||
|
|
||
| private static final RetrySettings ADMIN_REQUESTS_LIMIT_EXCEEDED_RETRY_SETTINGS = | ||
| RetrySettings.newBuilder() | ||
| .setInitialRetryDelayDuration(Duration.ofSeconds(5L)) | ||
|
|
@@ -1993,6 +1997,9 @@ private GrpcCallContext createBaseCallContext() { | |
| if (endToEndTracingEnabled) { | ||
| context = context.withExtraHeaders(metadataProvider.newEndToEndTracingHeader()); | ||
| } | ||
| if (isEnableAFEServerTiming()) { | ||
| context = context.withExtraHeaders(metadataProvider.newAfeServerTimingHeader()); | ||
| } | ||
| return context | ||
| .withStreamWaitTimeoutDuration(waitTimeout) | ||
| .withStreamIdleTimeoutDuration(idleTimeout); | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.