Class OpenTelemetryUtils

java.lang.Object
com.sap.cds.services.utils.OpenTelemetryUtils

public class OpenTelemetryUtils extends Object
  • Field Details

    • CDS_TENANT

      public static final io.opentelemetry.api.common.AttributeKey<String> CDS_TENANT
    • CDS_SERVICE

      public static final io.opentelemetry.api.common.AttributeKey<String> CDS_SERVICE
    • CDS_EVENT_NAME

      public static final io.opentelemetry.api.common.AttributeKey<String> CDS_EVENT_NAME
    • CDS_ENTITY_NAME

      public static final io.opentelemetry.api.common.AttributeKey<String> CDS_ENTITY_NAME
    • CDS_OUTBOX_TARGET

      public static final io.opentelemetry.api.common.AttributeKey<String> CDS_OUTBOX_TARGET
    • CDS_CQN_STATEMENT

      public static final io.opentelemetry.api.common.AttributeKey<String> CDS_CQN_STATEMENT
    • CDS_CQN_TARGET_ENTITY

      public static final io.opentelemetry.api.common.AttributeKey<String> CDS_CQN_TARGET_ENTITY
    • CDS_CQN_TO_PROTOCOL

      public static final io.opentelemetry.api.common.AttributeKey<String> CDS_CQN_TO_PROTOCOL
    • CDS_ODATA_IS_BATCH

      public static final io.opentelemetry.api.common.AttributeKey<Boolean> CDS_ODATA_IS_BATCH
    • CDS_ODATA_IS_CHANGESET

      public static final io.opentelemetry.api.common.AttributeKey<Boolean> CDS_ODATA_IS_CHANGESET
    • HTTP_STATUS_CODE

      public static final io.opentelemetry.api.common.AttributeKey<Long> HTTP_STATUS_CODE
    • HTTP_METHOD

      public static final io.opentelemetry.api.common.AttributeKey<String> HTTP_METHOD
    • HTTP_SCHEME

      public static final io.opentelemetry.api.common.AttributeKey<String> HTTP_SCHEME
    • HTTP_TARGET

      public static final io.opentelemetry.api.common.AttributeKey<String> HTTP_TARGET
  • Method Details

    • getMeter

      public static io.opentelemetry.api.metrics.Meter getMeter(String instrumentationName)
    • 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.api.trace.SpanKind kind)
    • createSpan

      public static Optional<io.opentelemetry.api.trace.Span> createSpan(OpenTelemetryUtils.CdsSpanType type, io.opentelemetry.context.Context parentContext)
    • createSpan

      public static Optional<io.opentelemetry.api.trace.Span> createSpan(OpenTelemetryUtils.CdsSpanType type, io.opentelemetry.context.Context parentContext, io.opentelemetry.api.trace.SpanKind kind)
    • updateSpan

      public static void updateSpan(Optional<io.opentelemetry.api.trace.Span> span, String serviceName, String eventName, String entityName)
    • updateSpan

      public static void updateSpan(Optional<io.opentelemetry.api.trace.Span> span, String requestContextId, RequestContext requestContext)
    • updateSpan

      public static void updateSpan(Optional<io.opentelemetry.api.trace.Span> span, ChangeSetContext changeSetContext)
    • updateSpan

      public static void updateSpan(Optional<io.opentelemetry.api.trace.Span> span, CdsRuntime runtime, String cqnOperation, com.sap.cds.reflect.CdsEntity targetEntity, com.sap.cds.ql.cqn.CqnStatement cqnStatement, String targetProtocol)
    • endSpan

      public static void endSpan(Optional<io.opentelemetry.api.trace.Span> span)
    • recordException

      public static void recordException(Optional<io.opentelemetry.api.trace.Span> span, Exception e)
    • setTracerProvider

      public static void setTracerProvider(io.opentelemetry.api.trace.TracerProvider tracerProvider)