Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

opentelemetrytracer: Allow sampler to set variant type span attribute… #32681

Conversation

samohte
Copy link
Contributor

@samohte samohte commented Mar 4, 2024

Commit Message: Allow sampler to set variant type span attributes
Additional Description: The opentelemetry sampler interface allows a sampler to add span attributes. The current Envoy implementation has the limitation that only string attributes are allowed.
In #32333 a dependency to Otel C++ API was added. This enables us to use the same type for attributes as Otel C++ SDK does.
Risk Level:
Testing: Unit, Integration, Manual
Docs Changes: N/A
Release Notes: Allow sampler to set variant type span attributes
Platform Specific Features: N/A
[Optional Runtime guard:] N/A
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]

Copy link

As a reminder, PRs marked as draft will not be automatically assigned reviewers,
or be handled by maintainer-oncall triage.

Please mark your PR as ready when you want it to be reviewed!

🐱

Caused by: #32681 was opened by samohte.

see: more, trace.

#20)

 Allow sampler to set variant type span attributes.

Signed-off-by: thomas.ebner <[email protected]>
@samohte samohte force-pushed the allow-variant-otel-argument-type branch from 6d3bf53 to 5426b12 Compare March 4, 2024 09:57
@samohte samohte marked this pull request as ready for review March 4, 2024 11:13
@samohte samohte requested a review from htuch as a code owner March 4, 2024 11:13
Signed-off-by: thomas.ebner <[email protected]>
@joaopgrassi
Copy link
Contributor

CC @wbpcode some quality of life improvement :)

Copy link
Member

@wbpcode wbpcode left a comment

Choose a reason for hiding this comment

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

LGTM overall with some minor comments. Thanks for your contributions.

source/extensions/tracers/opentelemetry/otlp_utils.cc Outdated Show resolved Hide resolved
source/extensions/tracers/opentelemetry/samplers/sampler.h Outdated Show resolved Hide resolved
…argument-type

- move Otel types to otlp_utils.h to solve dependency problem

Signed-off-by: thomas.ebner <[email protected]>
Signed-off-by: thomas.ebner <[email protected]>
@samohte
Copy link
Contributor Author

samohte commented Mar 6, 2024

I have addressed the review comments and resolved the merge conflicts. PR should be ready for another review.

@wbpcode wbpcode merged commit 7186d1b into envoyproxy:main Mar 7, 2024
53 checks passed
@samohte samohte deleted the allow-variant-otel-argument-type branch March 7, 2024 07:12
mattjo added a commit to mattjo/envoy that referenced this pull request Mar 7, 2024
* origin:
  mobile: Clean up Java and Kotlin code (envoyproxy#32773)
  [mobile] Increase stream response buffer watermark size to 2MB (envoyproxy#32754)
  oauth2: support disabling redirects for AJAX requests (envoyproxy#32655)
  http2: Switch the value of envoy.reloadable_features.http2_use_oghttp2 to false (envoyproxy#32751)
  envoy: reverting unnecessary exception E-M macros (envoyproxy#32745)
  dfp: reverting 31433 (envoyproxy#32743)
  opentelemetrytracer: Allow sampler to set variant type span attribute… (envoyproxy#32681)
  mobile: Java code cleanup (envoyproxy#32747)
  mobile: fix quic_test_server_test (envoyproxy#32755)
  Common TunnelResponseHeadersOrTrailers for UDP & TCP tunneling (envoyproxy#32619)
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.

3 participants