Record Class OpenTelemetryPropagationContext
java.lang.Object
java.lang.Record
io.micronaut.tracing.opentelemetry.OpenTelemetryPropagationContext
- Record Components:
context
- The context
- All Implemented Interfaces:
io.micronaut.core.propagation.PropagatedContextElement
,io.micronaut.core.propagation.ThreadPropagatedContextElement<io.opentelemetry.context.Scope>
@Internal
public record OpenTelemetryPropagationContext(io.opentelemetry.context.Context context)
extends Record
implements io.micronaut.core.propagation.ThreadPropagatedContextElement<io.opentelemetry.context.Scope>
Open telemetry propagated context.
- Author:
- Denis Stepanov
-
Constructor Summary
ConstructorDescriptionOpenTelemetryPropagationContext
(io.opentelemetry.context.Context context) Creates an instance of aOpenTelemetryPropagationContext
record class. -
Method Summary
Modifier and TypeMethodDescriptionio.opentelemetry.context.Context
context()
Returns the value of thecontext
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.void
restoreThreadContext
(io.opentelemetry.context.Scope oldScope) final String
toString()
Returns a string representation of this record class.io.opentelemetry.context.Scope
-
Constructor Details
-
OpenTelemetryPropagationContext
public OpenTelemetryPropagationContext(io.opentelemetry.context.Context context) Creates an instance of aOpenTelemetryPropagationContext
record class.- Parameters:
context
- the value for thecontext
record component
-
-
Method Details
-
updateThreadContext
public io.opentelemetry.context.Scope updateThreadContext()- Specified by:
updateThreadContext
in interfaceio.micronaut.core.propagation.ThreadPropagatedContextElement<io.opentelemetry.context.Scope>
-
restoreThreadContext
public void restoreThreadContext(io.opentelemetry.context.Scope oldScope) - Specified by:
restoreThreadContext
in interfaceio.micronaut.core.propagation.ThreadPropagatedContextElement<io.opentelemetry.context.Scope>
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
context
public io.opentelemetry.context.Context context()Returns the value of thecontext
record component.- Returns:
- the value of the
context
record component
-