Package org.forgerock.opendj.otel
Class OpenTelemetryUtils
java.lang.Object
org.forgerock.opendj.otel.OpenTelemetryUtils
Utility class for OpenTelemetry.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final io.opentelemetry.context.propagation.TextMapGetter<Request>Allows OTel to read trace parent and state from an LDAP request.static final io.opentelemetry.context.ContextKey<String>Key for storing a transaction ID in the OpenTelemetry context.static final io.opentelemetry.context.propagation.TextMapSetter<Request>Allows OTel to write trace parent and trace state into an LDAP request. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidrecordExceptionIfNotNull(io.opentelemetry.api.trace.Span span, Throwable e) ReplacesSpan.recordException(java.lang.Throwable)with a version having a more compact stacktrace.
-
Field Details
-
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_REQUESTAllows 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_REQUESTAllows OTel to write trace parent and trace state into an LDAP request.
-
-
Method Details
-
recordExceptionIfNotNull
ReplacesSpan.recordException(java.lang.Throwable)with a version having a more compact stacktrace.- Parameters:
span- the span to record the exception one- if not-null, the exception to record
-