sumitagrawl commented on code in PR #11607:
URL: https://github.com/apache/ozone/pull/11607#discussion_r4375887233
##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/tracing/TracingUtil.java:
##########
@@ -62,11 +65,29 @@ public final class TracingUtil {
private static Tracer tracer = OpenTelemetry.noop().getTracer("noop");
private static volatile SdkTracerProvider sdkTracerProvider;
private static BatchSpanProcessor batchSpanProcessor;
+ private static boolean mdcContextStorageInstalled;
public static final String GLOBAL_TRACER_NAME = "ozone";
private TracingUtil() {
}
+ /**
+ * Adds the current trace and span IDs to the logging MDC.
+ * Only for Ozone services and CLIs, not the client library, so applications
keep their own MDC.
+ * Must be called before OpenTelemetry {@link Context} is first used in the
JVM.
+ */
+ public static synchronized void installMdcContextStorage() {
Review Comment:
add call while initTracing() itself as this is used in context, do not have
trigger for every service, as this may cause un-initialized in case like s3g,
... as changes can see.
--
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]