Skip to content

Conversation

@gfelbing
Copy link
Contributor

@gfelbing gfelbing commented Jan 7, 2021

Update OpenCensus to 0.28.1

Problem

The most recent update of OpenCensus contains a breaking change, namely making ContextUtils package private: census-instrumentation/opencensus-java@f8ea9bb#diff-3e846235e5a45651f4f79c6c7b4a325fe1b33a8e75ace3c188dd6104bd3e6dfa

Our project depends on opencensus as well as on grpc-java.
Unfortunately, we cannot update opencensus in our build as it would update the transitive dependency causing runtime errors due to that breaking change.

Solution

Updating OpenCensus to recent version, fixing the issue with the breaking change.

The call to ContextUtils.getValue can be replaced by Tracing.getTracer().getCurrentSpan(), as it calls ContextUtils.getValue(Context.current()); under the hood yielding the same behavior

Fixes

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Jan 7, 2021

CLA Signed

The committers are authorized under a signed CLA.

@gfelbing
Copy link
Contributor Author

gfelbing commented Jan 8, 2021

@jsuereth removes the breaking change in census-instrumentation/opencensus-java#2072.
Still, the ContextUtils will remain deprecated, suggesting to use the ContextHandleUtils.

@ejona86
Copy link
Member

ejona86 commented Jan 8, 2021

I'd have to dig a bit to confirm this change will work even if the gRPC context is not being used. But upgrading now to 0.28.1 will further propagate that broken Census release. I think we'll want to wait for a fixed release and then fix the API call. (But we can have this ready for once the Census release is available.)

@ejona86
Copy link
Member

ejona86 commented Jan 11, 2021

CC @voidzcy

@voidzcy
Copy link
Contributor

voidzcy commented Jan 11, 2021

Shouldn't this just be a no-op migration from ContextUtils to ContextHandleUtils?

@ejona86
Copy link
Member

ejona86 commented Jan 26, 2021

CC @ericgribkoff

@larry-safran
Copy link
Contributor

This has become irrelevant since grpc is now using version 0.31.0

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 27, 2023
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.

4 participants