Class TracingContext
java.lang.Object
org.forgerock.services.context.AbstractContext
org.forgerock.opentelemetry.trace.context.TracingContext
- All Implemented Interfaces:
Context
ForgeRock's
Context holding the tracing context.-
Field Summary
Fields inherited from class org.forgerock.services.context.AbstractContext
data -
Constructor Summary
ConstructorsConstructorDescriptionTracingContext(Context parent, io.opentelemetry.context.Context otelContext) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionchildTracingContext(Context parentContext, io.opentelemetry.api.trace.Span spanParent) Generates a new tracing context, child of this tracing context.io.opentelemetry.context.ContextReturns the OpenTelemetry context.Methods inherited from class org.forgerock.services.context.AbstractContext
as, asContext, containsContext, containsContext, get, getContext, getContextName, getId, getParent, getRootId, isRootContext, toJsonValue, toString
-
Constructor Details
-
TracingContext
Constructor.- Parameters:
parent- the parent contextotelContext- the OpenTelemetry context
-
-
Method Details
-
getOtelContext
public io.opentelemetry.context.Context getOtelContext()Returns the OpenTelemetry context.- Returns:
- the OpenTelemetry context
-
childTracingContext
public TracingContext childTracingContext(Context parentContext, io.opentelemetry.api.trace.Span spanParent) Generates a new tracing context, child of this tracing context.- Parameters:
parentContext- the parent contextspanParent- the parent span- Returns:
- a new child tracing context
-