/** * Retrieves the currently stored correlation context from the request context. * @return The correlation context as a string. */ public static String retrieveCorrelationContext() { //check if context is null - no correlation will happen if (ThreadContext.getRequestTelemetryContext() == null) { InternalLogger.INSTANCE.warn("No correlation wil happen, Thread context is null"); return ""; } CorrelationContext context = ThreadContext.getRequestTelemetryContext().getCorrelationContext(); return context.toString(); }
/** * Retrieves the currently stored correlation context from the request context. * @return The correlation context as a string. */ public static String retrieveCorrelationContext() { //check if context is null - no correlation will happen if (ThreadContext.getRequestTelemetryContext() == null) { InternalLogger.INSTANCE.warn("No correlation wil happen, Thread context is null"); return ""; } CorrelationContext context = ThreadContext.getRequestTelemetryContext().getCorrelationContext(); return context.toString(); }