implement gRPC client retry stats measures and views #2084
implement gRPC client retry stats measures and views #2084
Conversation
Did you notice the notice in
|
Yes, i did notice it. Is there a better alternative you would suggest? I didn't see bucket boundaries specified in gRFC-A45. |
It does not make sense to have >= 10, >=100, >=1000 buckets for count of retry-attempts. Those buckets were addd in the very first version of gRFC-A6, and later gRFC-A6 imposed maxRetryAttempts<=5 but the buckets were not updated (probably overlooked). See ncteisen/proposal@7354c1a#diff-a1d8d0295ab02319b3f5cb1f351fc16727eff4a614373d11eef437c89efb35fbL178-R177 |
ah okay makes sense. I'll remove the extraneous buckets and make >= 5 the upper bound - does that sound good? |
Yep. |
thanks @dapengzhang0 fixed in e597fe6 |
hi @jsuereth would you mind approving again (pending any changes that should be made) so CI can run? |
View.create( | ||
View.Name.create("grpc.io/client/retries_per_call"), | ||
"Number of client retries per call", | ||
GRPC_CLIENT_TRANSPARENT_RETRIES_PER_CALL, |
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.
should this be GRPC_CLIENT_RETRIES_PER_CALL ?
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.
yes great catch, thanks @asafdav2 - updated
@mackenziestarr I work on the same team as @jsuereth and I plan to review/approve, merge and release this PR this week. Thanks for your patience! |
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.
@dapengzhang0 would you mind reviewing this and indicating your approval from a gRPC perspective?
From an OpenCensus perspective, I am on board with the change - I just have a couple of suggested edits to fix @since
comments.
contrib/grpc_metrics/src/main/java/io/opencensus/contrib/grpc/metrics/RpcMeasureConstants.java
Outdated
Show resolved
Hide resolved
contrib/grpc_metrics/src/main/java/io/opencensus/contrib/grpc/metrics/RpcViews.java
Outdated
Show resolved
Hide resolved
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
thanks for updating those @punya, appreciate it 😄 |
[![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [io.opencensus:opencensus-contrib-grpc-metrics](https://togithub.com/census-instrumentation/opencensus-java) | `0.30.0` -> `0.31.0` | [![age](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-contrib-grpc-metrics/0.31.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-contrib-grpc-metrics/0.31.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-contrib-grpc-metrics/0.31.0/compatibility-slim/0.30.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-contrib-grpc-metrics/0.31.0/confidence-slim/0.30.0)](https://docs.renovatebot.com/merge-confidence/) | | [io.opencensus:opencensus-exporter-stats-stackdriver](https://togithub.com/census-instrumentation/opencensus-java) | `0.30.0` -> `0.31.0` | [![age](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-exporter-stats-stackdriver/0.31.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-exporter-stats-stackdriver/0.31.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-exporter-stats-stackdriver/0.31.0/compatibility-slim/0.30.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-exporter-stats-stackdriver/0.31.0/confidence-slim/0.30.0)](https://docs.renovatebot.com/merge-confidence/) | | [io.opencensus:opencensus-exporter-trace-stackdriver](https://togithub.com/census-instrumentation/opencensus-java) | `0.30.0` -> `0.31.0` | [![age](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-exporter-trace-stackdriver/0.31.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-exporter-trace-stackdriver/0.31.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-exporter-trace-stackdriver/0.31.0/compatibility-slim/0.30.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-exporter-trace-stackdriver/0.31.0/confidence-slim/0.30.0)](https://docs.renovatebot.com/merge-confidence/) | | [io.opencensus:opencensus-contrib-zpages](https://togithub.com/census-instrumentation/opencensus-java) | `0.30.0` -> `0.31.0` | [![age](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-contrib-zpages/0.31.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-contrib-zpages/0.31.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-contrib-zpages/0.31.0/compatibility-slim/0.30.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-contrib-zpages/0.31.0/confidence-slim/0.30.0)](https://docs.renovatebot.com/merge-confidence/) | | [io.opencensus:opencensus-impl](https://togithub.com/census-instrumentation/opencensus-java) | `0.30.0` -> `0.31.0` | [![age](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-impl/0.31.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-impl/0.31.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-impl/0.31.0/compatibility-slim/0.30.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-impl/0.31.0/confidence-slim/0.30.0)](https://docs.renovatebot.com/merge-confidence/) | | [io.opencensus:opencensus-api](https://togithub.com/census-instrumentation/opencensus-java) | `0.30.0` -> `0.31.0` | [![age](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-api/0.31.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-api/0.31.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-api/0.31.0/compatibility-slim/0.30.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-api/0.31.0/confidence-slim/0.30.0)](https://docs.renovatebot.com/merge-confidence/) | | [io.opencensus:opencensus-contrib-grpc-util](https://togithub.com/census-instrumentation/opencensus-java) | `0.30.0` -> `0.31.0` | [![age](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-contrib-grpc-util/0.31.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-contrib-grpc-util/0.31.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-contrib-grpc-util/0.31.0/compatibility-slim/0.30.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-contrib-grpc-util/0.31.0/confidence-slim/0.30.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>census-instrumentation/opencensus-java</summary> ### [`v0.31.0`](https://togithub.com/census-instrumentation/opencensus-java/releases/v0.31.0) [Compare Source](https://togithub.com/census-instrumentation/opencensus-java/compare/v0.30.0...v0.31.0) - fix: Shutdown Stackdriver MetricServiceClient properly by [@​janhicken](https://togithub.com/janhicken) in [census-instrumentation/opencensus-java#2091 - implement gRPC client retry stats measures and views by [@​mackenziestarr](https://togithub.com/mackenziestarr) in [census-instrumentation/opencensus-java#2084 **Full Changelog**: census-instrumentation/opencensus-java@v0.29.0...v0.31.0 </details> --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-spanner).
[![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [io.opencensus:opencensus-testing](https://togithub.com/census-instrumentation/opencensus-java) | `0.30.0` -> `0.31.0` | [![age](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-testing/0.31.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-testing/0.31.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-testing/0.31.0/compatibility-slim/0.30.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-testing/0.31.0/confidence-slim/0.30.0)](https://docs.renovatebot.com/merge-confidence/) | | [io.opencensus:opencensus-impl](https://togithub.com/census-instrumentation/opencensus-java) | `0.30.0` -> `0.31.0` | [![age](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-impl/0.31.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-impl/0.31.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-impl/0.31.0/compatibility-slim/0.30.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-impl/0.31.0/confidence-slim/0.30.0)](https://docs.renovatebot.com/merge-confidence/) | | [io.opencensus:opencensus-contrib-http-util](https://togithub.com/census-instrumentation/opencensus-java) | `0.30.0` -> `0.31.0` | [![age](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-contrib-http-util/0.31.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-contrib-http-util/0.31.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-contrib-http-util/0.31.0/compatibility-slim/0.30.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-contrib-http-util/0.31.0/confidence-slim/0.30.0)](https://docs.renovatebot.com/merge-confidence/) | | [io.opencensus:opencensus-api](https://togithub.com/census-instrumentation/opencensus-java) | `0.30.0` -> `0.31.0` | [![age](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-api/0.31.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-api/0.31.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-api/0.31.0/compatibility-slim/0.30.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-api/0.31.0/confidence-slim/0.30.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>census-instrumentation/opencensus-java</summary> ### [`v0.31.0`](https://togithub.com/census-instrumentation/opencensus-java/releases/v0.31.0) [Compare Source](https://togithub.com/census-instrumentation/opencensus-java/compare/v0.30.0...v0.31.0) - fix: Shutdown Stackdriver MetricServiceClient properly by [@​janhicken](https://togithub.com/janhicken) in [census-instrumentation/opencensus-java#2091 - implement gRPC client retry stats measures and views by [@​mackenziestarr](https://togithub.com/mackenziestarr) in [census-instrumentation/opencensus-java#2084 **Full Changelog**: census-instrumentation/opencensus-java@v0.29.0...v0.31.0 </details> --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client).
Based on my conversation with the grpc-java core team, the retry stats implementation of grpc-java is complete but lacks opencensus views. This PR adds them according to the measures and views outlined in the A45-retry-stats proposal.
Some open questions:
Given that(resolved)maxAttempts
maxes out at 5 in A6-client-retries should we specify a tighter set of buckets for the views (possibly [0, 5]) that use a distribution aggregationGRPC_CLIENT_RETRIES_VIEW
andGRPC_CLIENT_TRANSPARENT_RETRIES_VIEW
could be derived from their per-call counterparts0.28
for the@since
annotation in the javadoc but maybe it should be the next minor version