feat(opentelemetry): add support for OTEL v2#2142
Open
chris-olszewski wants to merge 2 commits into
Open
Conversation
41ba080 to
0b0f807
Compare
0b0f807 to
4f3a879
Compare
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.
What was changed
Add a new package that supports OTEL v2 interceptors.
Key changes:
OpenTelemetryWorkflowClientCallsInterceptoraliasIdGeneratorthat consumes a named random stream to make span ID generation deterministic and preventing it from affecting randomness in workflow.Reviewers should primarily focus on reviewing the second commit as it is the diff between v1 and v2 of this package. The first commit is a straight copy of the v1 package into the v2 directory.
Replacing #1951
Why?
We are adding a new package instead of bumping the dependency on the old one for a few reasons:
Quick note on James comment from previous PR
I don't think this is viable here as registering the tracer provider/context manager in
workflow/index.tsmutates the loaded frozen OTEL module.Checklist
Closes [Feature Request] Add support for opentelemetry v2 #1658
How was this tested:
Most tests were directly kept. Replay tests had to be dropped as we changed how we used randomness so histories are incompatible. Added history replay tests for this package as regression tests for future changes to this package.
Any docs updates needed?
Once this moves out of experimental, docs page should update to suggest using this package instead of v1.