Record Class BravePropagationContext
java.lang.Object
java.lang.Record
io.micronaut.tracing.brave.BravePropagationContext
- Record Components:
currentTraceContext- The correct trace contextcontext- The trace context
- All Implemented Interfaces:
io.micronaut.core.propagation.PropagatedContextElement, io.micronaut.core.propagation.ThreadPropagatedContextElement<brave.propagation.CurrentTraceContext.Scope>
@Internal
public record BravePropagationContext(brave.propagation.CurrentTraceContext currentTraceContext, brave.propagation.TraceContext context)
extends Record
implements io.micronaut.core.propagation.ThreadPropagatedContextElement<brave.propagation.CurrentTraceContext.Scope>
The Brave propagation context.
- Author:
- Denis Stepanov
-
Constructor Summary
ConstructorsConstructorDescriptionBravePropagationContext(brave.propagation.CurrentTraceContext currentTraceContext, brave.propagation.TraceContext context) Creates an instance of aBravePropagationContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbrave.propagation.TraceContextcontext()Returns the value of thecontextrecord component.brave.propagation.CurrentTraceContextReturns the value of thecurrentTraceContextrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.voidrestoreThreadContext(brave.propagation.CurrentTraceContext.Scope oldScope) final StringtoString()Returns a string representation of this record class.brave.propagation.CurrentTraceContext.Scope
-
Constructor Details
-
BravePropagationContext
public BravePropagationContext(brave.propagation.CurrentTraceContext currentTraceContext, brave.propagation.TraceContext context) Creates an instance of aBravePropagationContextrecord class.- Parameters:
currentTraceContext- the value for thecurrentTraceContextrecord componentcontext- the value for thecontextrecord component
-
-
Method Details
-
updateThreadContext
public brave.propagation.CurrentTraceContext.Scope updateThreadContext()- Specified by:
updateThreadContextin interfaceio.micronaut.core.propagation.ThreadPropagatedContextElement<brave.propagation.CurrentTraceContext.Scope>
-
restoreThreadContext
public void restoreThreadContext(brave.propagation.CurrentTraceContext.Scope oldScope) - Specified by:
restoreThreadContextin interfaceio.micronaut.core.propagation.ThreadPropagatedContextElement<brave.propagation.CurrentTraceContext.Scope>
-
toString
-
hashCode
-
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). -
currentTraceContext
public brave.propagation.CurrentTraceContext currentTraceContext()Returns the value of thecurrentTraceContextrecord component.- Returns:
- the value of the
currentTraceContextrecord component
-
context
-