HDDS-14961. Introduce configuration for tracing#10029
HDDS-14961. Introduce configuration for tracing#10029adoroszlai merged 6 commits intoapache:masterfrom
Conversation
|
@sumitagrawl could you please review this. |
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
adoroszlai
left a comment
There was a problem hiding this comment.
Thanks @sravani-revuri for updating the patch. Please see HDDS-14961.patch for suggested changes.
|
Thanks @sravani-revuri for the patch. |
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: