luozenglin commented on code in PR #12205:
URL: https://github.com/apache/doris/pull/12205#discussion_r960165002
##########
fe/fe-core/src/main/java/org/apache/doris/qe/ConnectProcessor.java:
##########
@@ -548,7 +561,21 @@ public TMasterOpResult proxyExecute(TMasterOpRequest
request) {
UUID uuid = UUID.randomUUID();
queryId = new TUniqueId(uuid.getMostSignificantBits(),
uuid.getLeastSignificantBits());
}
- executor.execute(queryId);
+ Context extractedContext =
Telemetry.getOpenTelemetry().getPropagators().getTextMapPropagator()
+ .extract(Context.current(), traceCarrier, getter);
+ try (Scope extract = extractedContext.makeCurrent()) {
Review Comment:
Here it should not be `extractedContext.makeCurrent()`, but
`masterQuerySpan.makeCurrent()`.
##########
fe/fe-core/src/main/java/org/apache/doris/qe/ConnectProcessor.java:
##########
@@ -548,7 +561,21 @@ public TMasterOpResult proxyExecute(TMasterOpRequest
request) {
UUID uuid = UUID.randomUUID();
queryId = new TUniqueId(uuid.getMostSignificantBits(),
uuid.getLeastSignificantBits());
}
- executor.execute(queryId);
+ Context extractedContext =
Telemetry.getOpenTelemetry().getPropagators().getTextMapPropagator()
Review Comment:
The extractedContext comes from the follower node and you should use
`Span.fromContext(extractedContext).getSpanContext().isValid()` to check
whether it is valid. If valid then initialize tracer.
--
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]