HDDS-14961. Move Tracing environment variables to Ozone configuration properties#10029
Open
sravani-revuri wants to merge 2 commits intoapache:masterfrom
Open
HDDS-14961. Move Tracing environment variables to Ozone configuration properties#10029sravani-revuri wants to merge 2 commits intoapache:masterfrom
sravani-revuri wants to merge 2 commits intoapache:masterfrom
Conversation
Contributor
Author
|
@sumitagrawl could you please review this. |
adoroszlai
reviewed
Apr 2, 2026
Contributor
adoroszlai
left a comment
There was a problem hiding this comment.
Thanks @sravani-revuri for working on this.
-
It would be nice if you could add a new
TracingConfigclass to group tracing-related configuration. That way config keys, values and logic would be in a single class, instead of scattered in 3 different files. (SeeOmConfigfor example. (KeysandDefaultsnested classes are not needed.)) This will also make it easier to enable dynamic reconfiguration in the follow-up.
-
We should still pick up values from environment variables if config is not set. Priority:
- config
- environment
- hard-coded values
-
Please add deprecation for
hdds.tracing.enabledin
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 changes were proposed in this pull request?
Currently, OpenTelemetry tracing in TracingUtil relies on environment variables OTEL_EXPORTER_OTLP_ENDPOINT, OTEL_TRACES_SAMPLER_ARG, and OTEL_SPAN_SAMPLING_ARG. which cannot be updated dynamically.
Moving these to the below configs to enable dynamic update.
OTEL_EXPORTER_OTLP_ENDPOINT → ozone.tracing.endpoint
OTEL_TRACES_SAMPLER_ARG → ozone.tracing.sampler
OTEL_SPAN_SAMPLING_ARG → ozone.tracing.span.sampling
Update hdds.tracing.enabled to ozone.tracing.enabled to align with the new naming convention.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-14961
How was this patch tested?
Manual Testing and existing test cases.
Valid case:
1) Changing ozone.tracing.sample and ozone.tracing.span.sampling:
configs:
Output:
2 traces when command is run 4 times
span level sampling for command:
2) Changing tracing.endpoint
configs:
Output:
Invalid case:
1) giving non decimal value to ozone.tracing.sample
configs:
Output:
2) giving wrong values to ozone.tracing.sample and ozone.tracing.span.sampling
configs:
Output: