Skip to content
This repository has been archived by the owner on Dec 23, 2023. It is now read-only.

Fix retry stat measures to match those in grpc-java exactly #2097

Conversation

mackenziestarr
Copy link
Contributor

  • fixes the retry stat measure to match those in grpc-java exactly as defined in CensusStatsModule
  • corrects type of GRPC_CLIENT_RETRY_DELAY_PER_CALL from MeasureLong to MeasureDouble

In the medium term grpc-java should reference the retry stat Measures defined in opencensus-java instead of creating its own, although these are referenced in a file called DeprecatedCensusConstants.java so i'm not sure what the long-term goal there is.

…ctly

change GRPC_CLIENT_RETRY_DELAY_PER_CALL from MeasureLong to MeasureDouble
@mackenziestarr
Copy link
Contributor Author

cc: @punya @dapengzhang0

@punya punya requested a review from jsuereth February 11, 2022 21:10
@punya
Copy link
Contributor

punya commented Feb 14, 2022

Would it be possible to add a test that verifies that the measures match?

@dapengzhang0 do you know why the measure constants are considered deprecated on the OpenCensus side? E.g., was there a desire at some point for the definitions in this repo to be considered the source of truth?

@mackenziestarr
Copy link
Contributor Author

hey @punya added a test in 05e8256, hopefully it is what you had in mind.

@punya
Copy link
Contributor

punya commented Feb 14, 2022

hey @punya added a test in 05e8256, hopefully it is what you had in mind.

Thanks for putting in the effort to write this. I was actually hoping that the test would check against the source of truth (grpc-java), not against hardcoded constants which simply repeat the code. If accessing the source of truth is impossible (or even very kludgey), I'd rather revert this test commit and merge without it.

@dapengzhang0
Copy link

@dapengzhang0 do you know why the measure constants are considered deprecated on the OpenCensus side? E.g., was there a desire at some point for the definitions in this repo to be considered the source of truth?

@punya, that might be for some historical reasons mentioned in the comment here
grpc/grpc-java#4494 (comment)

I don't if the current status inside google has changed. cc\ @zhangkun83 who might have more context.

@mackenziestarr
Copy link
Contributor Author

@punya I think any efforts towards preventing a regression would better be spent opening a pull request in grpc-java to upgrade to the eventual opencensus version that contains this commit and reference the measures defined here directly - I'd be happy to contribute that once this is merged. I'm fine with you reverting the superfluous unit test, I agree it adds nothing.

@punya punya merged commit 05a25da into census-instrumentation:master Feb 16, 2022
@mackenziestarr
Copy link
Contributor Author

hi @punya would it be possible to cut this into a 0.31.1 release since its a backwards compatible bug fix

@punya
Copy link
Contributor

punya commented Mar 1, 2022

@mackenziestarr I'd be happy to, but probably no sooner than next week (unfortunately the release process isn't as automated as we'd like it to be). Would that work for you?

@mackenziestarr
Copy link
Contributor Author

@punya sounds great! thanks for responding so quickly

@mackenziestarr
Copy link
Contributor Author

hi @punya would it be possible to cut a release this week or the next?

@punya
Copy link
Contributor

punya commented Apr 4, 2022

@mackenziestarr my apologies for dropping the ball on this. I'll get this out today.

punya pushed a commit to punya/opencensus-java that referenced this pull request Apr 4, 2022
…nstrumentation#2097)

* update descriptions of retry measures to match those in grpc-java exactly
* change GRPC_CLIENT_RETRY_DELAY_PER_CALL from MeasureLong to MeasureDouble
@mackenziestarr
Copy link
Contributor Author

no problem @punya, thank you!

punya added a commit that referenced this pull request Apr 5, 2022
…2102)

* update descriptions of retry measures to match those in grpc-java exactly
* change GRPC_CLIENT_RETRY_DELAY_PER_CALL from MeasureLong to MeasureDouble

Co-authored-by: Mackenzie Starr <mstarr@etsy.com>
@punya
Copy link
Contributor

punya commented Apr 6, 2022

FYI: I ran into a few CI snags, but I'm still working on this. We haven't done a patch release in a while.

@mackenziestarr
Copy link
Contributor Author

hi @punya is the patch release still blocked on CI?

@punya
Copy link
Contributor

punya commented Apr 29, 2022

Sorry for the long wait, @mackenziestarr. This release is finally out (Github | Sonatype).

@mackenziestarr
Copy link
Contributor Author

@punya no worries, thank you! i just pulled down the release artifact and tested it out, works great

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants