Class OpenTelemetryUtils

java.lang.Object
org.forgerock.opendj.otel.OpenTelemetryUtils

public final class OpenTelemetryUtils extends Object
Utility class for OpenTelemetry.
  • Field Details

    • TRANSACTION_ID_CTX_KEY

      public static final io.opentelemetry.context.ContextKey<String> TRANSACTION_ID_CTX_KEY
      Key for storing a transaction ID in the OpenTelemetry context.
    • READ_FROM_LDAP_REQUEST

      public static final io.opentelemetry.context.propagation.TextMapGetter<Request> READ_FROM_LDAP_REQUEST
      Allows OTel to read trace parent and state from an LDAP request.
    • WRITE_INTO_LDAP_REQUEST

      public static final io.opentelemetry.context.propagation.TextMapSetter<Request> WRITE_INTO_LDAP_REQUEST
      Allows OTel to write trace parent and trace state into an LDAP request.
  • Method Details

    • recordExceptionIfNotNull

      public static void recordExceptionIfNotNull(io.opentelemetry.api.trace.Span span, Throwable e)
      Replaces Span.recordException(java.lang.Throwable) with a version having a more compact stacktrace.
      Parameters:
      span - the span to record the exception on
      e - if not-null, the exception to record