rajeshkumarchandolu commented on code in PR #12145:
URL: https://github.com/apache/ozone/pull/12145#discussion_r4694832925
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/SCMStateMachine.java:
##########
@@ -202,9 +205,12 @@ public CompletableFuture<Message> applyTransaction(
if (LOG.isDebugEnabled()) {
LOG.debug("{}: applyTransaction {}", getId(),
TermIndex.valueOf(trx.getLogEntry()));
}
- try {
+ final Span span = request.getTraceID().isEmpty() ? Span.getInvalid()
+ :
TracingUtil.importAndCreateSpan("SCMStateMachine.applyTransaction",
request.getTraceID());
Review Comment:
Thanks for checking this. You're right that the parser drops tracestate (it
splits each "key=value" pair at every '='), while traceparent survives, so the
spans stay connected.
For context, tracestate isn't used for linking — traceparent carries the
trace id, parent span id and sampled flag, which is all Jaeger needs.
tracestate carries vendor/sampler-specific data along the trace, for example:
- OpenTelemetry consistent probability sampling (ot=th:...;rv:...), so
services with different sampling ratios agree on the decision and backends can
estimate request counts from sampled traces.
- Vendor agents such as Datadog (dd=...), Elastic (es=...), New Relic or
Dynatrace, which keep their own sampling priority or origin data there.
Ozone doesn't read or write tracestate today: sampling is driven entirely by
Ozone's own tracing configuration (ozone.tracing.sampler and
ozone.tracing.span.sampling), set in one place per service, so nothing in Ozone
depends on it. The parser behaviour is also pre-existing and shared by every
place Ozone imports a trace context, not specific to the Ratis path added here.
So I'd like to keep this PR from changing anything around tracestate.
Propagating it unchanged (as W3C Trace Context asks of participants that don't
use it) matters once an upstream tracer that relies on it is in front of Ozone,
and I'll track that separately.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]