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.api.OpenTelemetry openTelemetry, io.opentelemetry.context.Context otelContext)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Use TracingContext(Context, io.opentelemetry.context.Context) instead as the OpenTelemetry object will be removed from the context in a future release.
    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.api.OpenTelemetry
    Deprecated, for removal: This API element is subject to removal in a future version.
    Downstream components should obtain the OpenTelemetry object from a dependency injection framework.
    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 java.lang.Object

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

    • TracingContext

      @Deprecated(since="27.1.0", forRemoval=true) public TracingContext(org.forgerock.services.context.Context parent, io.opentelemetry.api.OpenTelemetry openTelemetry, io.opentelemetry.context.Context otelContext)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use TracingContext(Context, io.opentelemetry.context.Context) instead as the OpenTelemetry object will be removed from the context in a future release.
      Constructor.
      Parameters:
      parent - the parent context
      openTelemetry - the OpenTelemetry object
      otelContext - the OpenTelemetry context
    • 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

    • getOpenTelemetry

      @Deprecated(since="27.1.0", forRemoval=true) public io.opentelemetry.api.OpenTelemetry getOpenTelemetry()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Downstream components should obtain the OpenTelemetry object from a dependency injection framework.
      Returns the OpenTelemetry object.
      Returns:
      the OpenTelemetry object
    • 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