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
ConstructorsConstructorDescriptionOpenTelemetryPropagationContext(io.opentelemetry.context.Context context) Creates an instance of aOpenTelemetryPropagationContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionio.opentelemetry.context.Contextcontext()Returns the value of thecontextrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.voidrestoreThreadContext(io.opentelemetry.context.Scope oldScope) final StringtoString()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 aOpenTelemetryPropagationContextrecord class.- Parameters:
context- the value for thecontextrecord component
-
-
Method Details
-
updateThreadContext
public io.opentelemetry.context.Scope updateThreadContext()- Specified by:
updateThreadContextin interfaceio.micronaut.core.propagation.ThreadPropagatedContextElement<io.opentelemetry.context.Scope>
-
restoreThreadContext
public void restoreThreadContext(io.opentelemetry.context.Scope oldScope) - Specified by:
restoreThreadContextin 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 thecontextrecord component.- Returns:
- the value of the
contextrecord component
-