Add OpenCensus trace bridge/shim#3210
Merged
srikanthccv merged 5 commits intoopen-telemetry:mainfrom Mar 17, 2023
Merged
Conversation
eeddf41 to
1097e70
Compare
ocelotl
suggested changes
Mar 3, 2023
shim/opentelemetry-opencensus-shim/src/opentelemetry/shim/opencensus/__init__.py
Show resolved
Hide resolved
shim/opentelemetry-opencensus-shim/src/opentelemetry/shim/opencensus/_patch.py
Outdated
Show resolved
Hide resolved
shim/opentelemetry-opencensus-shim/src/opentelemetry/shim/opencensus/_patch.py
Show resolved
Hide resolved
ocelotl
approved these changes
Mar 3, 2023
lzchen
reviewed
Mar 6, 2023
shim/opentelemetry-opencensus-shim/src/opentelemetry/shim/opencensus/_patch.py
Outdated
Show resolved
Hide resolved
lzchen
reviewed
Mar 6, 2023
shim/opentelemetry-opencensus-shim/src/opentelemetry/shim/opencensus/_patch.py
Show resolved
Hide resolved
lzchen
reviewed
Mar 6, 2023
shim/opentelemetry-opencensus-shim/src/opentelemetry/shim/opencensus/_shim_tracer.py
Show resolved
Hide resolved
lzchen
reviewed
Mar 6, 2023
shim/opentelemetry-opencensus-shim/src/opentelemetry/shim/opencensus/_shim_tracer.py
Show resolved
Hide resolved
lzchen
reviewed
Mar 6, 2023
shim/opentelemetry-opencensus-shim/src/opentelemetry/shim/opencensus/_shim_tracer.py
Show resolved
Hide resolved
lzchen
reviewed
Mar 6, 2023
shim/opentelemetry-opencensus-shim/src/opentelemetry/shim/opencensus/_shim_tracer.py
Show resolved
Hide resolved
lzchen
reviewed
Mar 6, 2023
shim/opentelemetry-opencensus-shim/src/opentelemetry/shim/opencensus/_patch.py
Show resolved
Hide resolved
lzchen
reviewed
Mar 6, 2023
shim/opentelemetry-opencensus-shim/src/opentelemetry/shim/opencensus/_patch.py
Show resolved
Hide resolved
lzchen
reviewed
Mar 6, 2023
shim/opentelemetry-opencensus-shim/src/opentelemetry/shim/opencensus/_shim_tracer.py
Show resolved
Hide resolved
jeremydvoss
reviewed
Mar 7, 2023
shim/opentelemetry-opencensus-shim/src/opentelemetry/shim/opencensus/_patch.py
Show resolved
Hide resolved
Member
Author
|
Thanks for reviews everyone. I just realized we probably need to bridge the Context APIs as well for instrumentations which extract a Context with propagators e.g. opencensus-ext-flask. I'll work on this in a separate PR and track it in the issue. |
lzchen
reviewed
Mar 9, 2023
shim/opentelemetry-opencensus-shim/src/opentelemetry/shim/opencensus/_shim_span.py
Show resolved
Hide resolved
lzchen
reviewed
Mar 9, 2023
shim/opentelemetry-opencensus-shim/src/opentelemetry/shim/opencensus/_shim_span.py
Show resolved
Hide resolved
lzchen
reviewed
Mar 9, 2023
shim/opentelemetry-opencensus-shim/src/opentelemetry/shim/opencensus/_shim_span.py
Show resolved
Hide resolved
lzchen
reviewed
Mar 9, 2023
shim/opentelemetry-opencensus-shim/src/opentelemetry/shim/opencensus/_shim_span.py
Show resolved
Hide resolved
jsuereth
approved these changes
Mar 13, 2023
jsuereth
left a comment
There was a problem hiding this comment.
Mostly looking at this for OC compatibility compliance.
Tests cover everything I'd expect to see. Also to confirm, this does NOT include the bridge for propagation right?
Member
Author
Correct. I updated #3203 to track it. |
lzchen
approved these changes
Mar 16, 2023
Member
|
@jeremydvoss PTAL. |
jeremydvoss
approved these changes
Mar 16, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Implements the OpenCensus tracing shim/bridge. See issue for more details. For now, users must import and call
install_shim()for the shim to take effect.Part of #3203
Caveats
Tracer.start_span()only accepts span name, while OTel only allows setting those properties instart_span(); there is no way to set them after the fact with a pure API bridge.Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Added many tests for mapping logic and interaction with OpenTelemetry. There are test for the "OpenTelemetry sandwich" problem, where OpenCensus and OpenTelemetry instrumentation should interoperate.
Does This PR Require a Contrib Repo Change?
Answer the following question based on these examples of changes that would require a Contrib Repo Change:
The OTel specification has changed which prompted this PR to update the method interfaces of
opentelemetry-api/oropentelemetry-sdk/The method interfaces of
test/utilhave changedScripts in
scripts/that were copied over to the Contrib repo have changedConfiguration files that were copied over to the Contrib repo have changed (when consistency between repositories is applicable) such as in
pyproject.tomlisort.cfg.flake8When a new
.github/CODEOWNERis addedMajor changes to project information, such as in:
README.mdCONTRIBUTING.mdYes. - Link to PR:
No.
Checklist: