Package io.quarkus.opentelemetry.runtime
Class OpenTelemetryUtil
java.lang.Object
io.quarkus.opentelemetry.runtime.OpenTelemetryUtil
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic voidclearMDCData(io.vertx.core.Context vertxContext) Clears MDC data related to OpenTelemetryconvertKeyValueListToMap(List<String> headers) Converts a list of "key=value" pairs into a map.getSpanData(io.opentelemetry.context.Context context) Gets current span data from the MDC context.static voidsetMDCData(io.opentelemetry.context.Context context, io.vertx.core.Context vertxContext) Sets MDC data by using the current span from the context.static voidsetMDCData(Map<String, String> spanData, io.vertx.core.Context vertxContext)
-
Field Details
-
TRACE_ID
- See Also:
-
SPAN_ID
- See Also:
-
SAMPLED
- See Also:
-
PARENT_ID
- See Also:
-
-
Method Details
-
convertKeyValueListToMap
Converts a list of "key=value" pairs into a map. Empty entries will be removed. In case of duplicate keys, the latest takes precedence.- Parameters:
headers- nullable list of "key=value" pairs- Returns:
- non-null map of key-value pairs
-
setMDCData
public static void setMDCData(io.opentelemetry.context.Context context, io.vertx.core.Context vertxContext) Sets MDC data by using the current span from the context.- Parameters:
context- opentelemetry contextvertxContext- vertx context
-
setMDCData
-
getSpanData
Gets current span data from the MDC context.- Parameters:
context- opentelemetry context
-
clearMDCData
public static void clearMDCData(io.vertx.core.Context vertxContext) Clears MDC data related to OpenTelemetry- Parameters:
vertxContext- vertx context
-