Class TracingContext

java.lang.Object
org.forgerock.services.context.AbstractContext
org.forgerock.opentelemetry.trace.context.TracingContext
All Implemented Interfaces:
org.forgerock.services.context.Context

public final class TracingContext extends org.forgerock.services.context.AbstractContext
ForgeRock's Context holding the tracing context.
  • Field Summary

    Fields inherited from class org.forgerock.services.context.AbstractContext

    data
  • Constructor Summary

    Constructors
    Constructor
    Description
    TracingContext(org.forgerock.services.context.Context parent, io.opentelemetry.context.Context otelContext)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    childTracingContext(org.forgerock.services.context.Context parentContext, io.opentelemetry.api.trace.Span spanParent)
    Generates a new tracing context, child of this tracing context.
    io.opentelemetry.context.Context
    Returns 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

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • TracingContext

      public TracingContext(org.forgerock.services.context.Context parent, io.opentelemetry.context.Context otelContext)
      Constructor.
      Parameters:
      parent - the parent context
      otelContext - the OpenTelemetry context
  • Method Details

    • getOtelContext

      public io.opentelemetry.context.Context getOtelContext()
      Returns the OpenTelemetry context.
      Returns:
      the OpenTelemetry context
    • childTracingContext

      public TracingContext childTracingContext(org.forgerock.services.context.Context parentContext, io.opentelemetry.api.trace.Span spanParent)
      Generates a new tracing context, child of this tracing context.
      Parameters:
      parentContext - the parent context
      spanParent - the parent span
      Returns:
      a new child tracing context