Skip to content

opentelemetry tracer: Add TraceState types from OTel C++ SDK#32333

Merged
phlax merged 10 commits intoenvoyproxy:mainfrom
dynatrace-oss-contrib:add-otel-trace-state
Feb 22, 2024
Merged

opentelemetry tracer: Add TraceState types from OTel C++ SDK#32333
phlax merged 10 commits intoenvoyproxy:mainfrom
dynatrace-oss-contrib:add-otel-trace-state

Conversation

@joaopgrassi
Copy link
Copy Markdown
Contributor

Commit Message: Add TraceState type following the OTel/W3C specs
Additional Description: TraceState is a type that is used to manipulate the trace state of a traced request. One of the many uses for TraceState is propagation of sampling information, such as sampling probability and randomness.
Risk Level: Low
Testing: Unit tests
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]

This is a continuation of the initial Sampling PR #30259. We will be sending another follow up PR for a Dynatrace sampler, and we will need to manipulate the TraceState there. Note that the types here can be used by any other sampler, which may be added in the future, such as the Probability Sampler. This sets the base for it.

Note: I did not want to re-invent the wheel, and simply "port" the code from the OTel C++ API/SDK repository that already does all of the TraceState handling. The reason is that is compliant with the OTel/W3C specs and have extensive tests. I'm not sure how such things are handled in Envoy, but that is Apache 2.0 license, and I kept the license heading and added links to the original source files.

It is mostly the same, I just adapted it to use absl types instead of the ones they use in the OTel C++ SDK repo.

CC @wbpcode

@joaopgrassi joaopgrassi requested a review from htuch as a code owner February 12, 2024 13:38
Signed-off-by: Joao Grassi <[email protected]>
Signed-off-by: Joao Grassi <[email protected]>
@joaopgrassi
Copy link
Copy Markdown
Contributor Author

I have a failing spelling check in one of the tests, but I feel it doesn't make sense to add that to the dictionary. Is there a way to ignore it, in code? (e.g., annotation or so)

@joaopgrassi
Copy link
Copy Markdown
Contributor Author

/retest

@repokitteh-read-only repokitteh-read-only bot added the deps Approval required for changes to Envoy's external dependencies label Feb 21, 2024
@repokitteh-read-only
Copy link
Copy Markdown

CC @envoyproxy/dependency-shepherds: Your approval is needed for changes made to (bazel/.*repos.*\.bzl)|(bazel/dependency_imports\.bzl)|(api/bazel/.*\.bzl)|(.*/requirements\.txt)|(.*\.patch).
envoyproxy/dependency-shepherds assignee is @RyanTheOptimist

🐱

Caused by: #32333 was synchronize by joaopgrassi.

see: more, trace.

@RyanTheOptimist
Copy link
Copy Markdown
Contributor

/assign @phlax
@phlax can you take a look at this from a deps shepherd standpoint?

Signed-off-by: Joao Grassi <[email protected]>
@joaopgrassi joaopgrassi requested a review from htuch February 22, 2024 08:58
Copy link
Copy Markdown
Member

@phlax phlax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks @joaopgrassi

@repokitteh-read-only repokitteh-read-only bot removed the deps Approval required for changes to Envoy's external dependencies label Feb 22, 2024
@phlax
Copy link
Copy Markdown
Member

phlax commented Feb 22, 2024

/retest

@joaopgrassi
Copy link
Copy Markdown
Contributor Author

Seems iOS tests are failing.. not sure if it's related. Let's try again

/retest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants