Package com.sap.cds.services.impl.utils
Class OpenTelemetryUtils
java.lang.Object
com.sap.cds.services.impl.utils.OpenTelemetryUtils
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Optional<io.opentelemetry.api.trace.Span>
static Optional<io.opentelemetry.api.trace.Span>
createSpan
(OpenTelemetryUtils.CdsSpanType type, io.opentelemetry.context.Context parentContext) static void
static void
recordException
(Optional<io.opentelemetry.api.trace.Span> span, Exception e) static void
setTracerProvider
(io.opentelemetry.api.trace.TracerProvider tracerProvider) static void
updateSpan
(Optional<io.opentelemetry.api.trace.Span> span, ChangeSetContextImpl changeSetContext) static void
updateSpan
(Optional<io.opentelemetry.api.trace.Span> span, RequestContextSPI requestContext) static void
updateSpan
(Optional<io.opentelemetry.api.trace.Span> span, String serviceName, String eventName, String entityName)
-
Method Details
-
createSpan
public static Optional<io.opentelemetry.api.trace.Span> createSpan(OpenTelemetryUtils.CdsSpanType type) -
createSpan
public static Optional<io.opentelemetry.api.trace.Span> createSpan(OpenTelemetryUtils.CdsSpanType type, io.opentelemetry.context.Context parentContext) -
updateSpan
-
updateSpan
public static void updateSpan(Optional<io.opentelemetry.api.trace.Span> span, RequestContextSPI requestContext) -
updateSpan
public static void updateSpan(Optional<io.opentelemetry.api.trace.Span> span, ChangeSetContextImpl changeSetContext) -
endSpan
-
recordException
-
setTracerProvider
public static void setTracerProvider(io.opentelemetry.api.trace.TracerProvider tracerProvider)
-