Uses of Class
brave.propagation.TraceContext
-
Packages that use TraceContext Package Description brave brave.baggage brave.handler brave.propagation -
-
Uses of TraceContext in brave
Methods in brave that return TraceContext Modifier and Type Method Description abstract TraceContextScopedSpan. context()Returns the trace context associated with this spanabstract TraceContextSpan. context()Methods in brave with parameters of type TraceContext Modifier and Type Method Description ClockTracing. clock(TraceContext context)This exposes the microsecond clock used by operations such asSpan.finish().SpanTracer. joinSpan(TraceContext context)Joining is re-using the same trace and span ids extracted from an incoming RPC request.SpanTracer. newChild(TraceContext parent)Explicitly creates a child within an existing trace.<T> SpanTracer. nextSpanWithParent(SamplerFunction<T> samplerFunction, T arg, TraceContext parent)LikeTracer.nextSpan(SamplerFunction, Object)except this controls the parent context explicitly.protected StringErrorParser. parseValue(Throwable input, TraceContext context)Deprecated.protected abstract StringTag. parseValue(I input, TraceContext context)Override to change what data from the input are parsed into the span modeling it.ScopedSpanTracer. startScopedSpanWithParent(String name, TraceContext parent)Same asTracer.startScopedSpan(String), except ignores the current trace context.voidTag. tag(I input, TraceContext context, MutableSpan span)Tags the value parsed from theinput.voidTag. tag(I input, TraceContext context, SpanCustomizer span)Tags the value parsed from theinput.SpanTracer. toSpan(TraceContext context)Converts the context to a Span object after decorating it for propagation.StringTag. value(I input, TraceContext context)Returns the value that would be tagged to the span ornull. -
Uses of TraceContext in brave.baggage
Methods in brave.baggage with parameters of type TraceContext Modifier and Type Method Description static List<BaggageField>BaggageField. getAll(TraceContext context)Deprecated.Since 5.12 useBaggageField.getAllValues(TraceContext)static Map<String,String>BaggageField. getAllValues(TraceContext context)static BaggageFieldBaggageField. getByName(TraceContext context, String name)Looks up the field byname, useful for when you do not have a reference to it.StringBaggageField. getValue(TraceContext context)Returns the most recent value for this field in the context or null if unavailable.booleanBaggageField. updateValue(TraceContext context, String value)Updates the value of this field, or ignores if read-only or not configured. -
Uses of TraceContext in brave.handler
Methods in brave.handler with parameters of type TraceContext Modifier and Type Method Description booleanSpanHandler. begin(TraceContext context, MutableSpan span, TraceContext parent)This is called when a span is sampled, but before it is started.booleanFinishedSpanHandler. end(TraceContext context, MutableSpan span, SpanHandler.Cause cause)Deprecated.booleanSpanHandler. end(TraceContext context, MutableSpan span, SpanHandler.Cause cause)Called when data collection complete.abstract booleanFinishedSpanHandler. handle(TraceContext context, MutableSpan span)Deprecated.Since 5.12 useSpanHandler.end(TraceContext, MutableSpan, Cause)withSpanHandler.Cause.FINISHEDConstructors in brave.handler with parameters of type TraceContext Constructor Description MutableSpan(TraceContext context, MutableSpan defaults)Creates a new instance from the given context, and defaults in the span. -
Uses of TraceContext in brave.propagation
Methods in brave.propagation that return TraceContext Modifier and Type Method Description TraceContextTraceContext.Builder. build()TraceContextTraceContextOrSamplingFlags. context()TraceContextExtraFieldPropagation.Factory. decorate(TraceContext context)Deprecated.TraceContextPropagation.Factory. decorate(TraceContext context)Decorates the input such that it can propagate extra state, such as a timestamp or baggage.abstract TraceContextCurrentTraceContext. get()Returns the current span in scope or null if there isn't one.TraceContextStrictCurrentTraceContext. get()TraceContextThreadLocalCurrentTraceContext. get()Methods in brave.propagation with parameters of type TraceContext Modifier and Type Method Description TraceContextOrSamplingFlags.BuilderTraceContextOrSamplingFlags.Builder. context(TraceContext context)Deprecated.Since 5.12, useTraceContextOrSamplingFlags.newBuilder(TraceIdContext)static TraceContextOrSamplingFlagsTraceContextOrSamplingFlags. create(TraceContext context)Used to implementTraceContext.Extractor.extract(Object)for a format that can extract a completeTraceContext, including a trace ID and span ID.TraceContextExtraFieldPropagation.Factory. decorate(TraceContext context)Deprecated.TraceContextPropagation.Factory. decorate(TraceContext context)Decorates the input such that it can propagate extra state, such as a timestamp or baggage.protected CurrentTraceContext.ScopeCurrentTraceContext. decorateScope(TraceContext context, CurrentTraceContext.Scope scope)When implementing CurrentTraceContext.newScope(TraceContext), decorate the result before returning it.CurrentTraceContext.ScopeCurrentTraceContext.ScopeDecorator. decorateScope(TraceContext context, CurrentTraceContext.Scope scope)CurrentTraceContext.ScopeStrictScopeDecorator. decorateScope(TraceContext context, CurrentTraceContext.Scope scope)Identifies problems by throwingIllegalStateExceptionwhen a scope is closed on a different thread.static StringExtraFieldPropagation. get(TraceContext context, String name)Deprecated.Since 5.11 useBaggageField.getByName(TraceContext, String)andBaggageField.getValue(TraceContext)static Map<String,String>ExtraFieldPropagation. getAll(TraceContext context)Deprecated.Since 5.11 useBaggageField.getAll(TraceContext)voidTraceContext.Injector. inject(TraceContext traceContext, R request)Usually calls a setter for each propagation field to send downstream.CurrentTraceContext.ScopeCurrentTraceContext. maybeScope(TraceContext context)LikeCurrentTraceContext.newScope(TraceContext), except returnsCurrentTraceContext.Scope.NOOPif the given context is already in scope.CurrentTraceContext.ScopeStrictCurrentTraceContext. maybeScope(TraceContext context)static TraceContextOrSamplingFlags.BuilderTraceContextOrSamplingFlags. newBuilder(TraceContext context)Use when implementingTraceContext.Extractor.extract(Object)requiresTraceContextOrSamplingFlags.Builder.sampledLocal()orTraceContextOrSamplingFlags.Builder.addExtra(Object).abstract CurrentTraceContext.ScopeCurrentTraceContext. newScope(TraceContext context)Sets the current span in scope until the returned object is closed.CurrentTraceContext.ScopeStrictCurrentTraceContext. newScope(TraceContext context)CurrentTraceContext.ScopeThreadLocalCurrentTraceContext. newScope(TraceContext currentSpan)static voidExtraFieldPropagation. set(TraceContext context, String name, String value)Deprecated.Since 5.11 useBaggageField.getByName(TraceContext, String)andBaggageField.updateValue(String)static StringB3SingleFormat. writeB3SingleFormat(TraceContext context)Writes all B3 defined fields in the trace context to a hyphen delimited string.static byte[]B3SingleFormat. writeB3SingleFormatAsBytes(TraceContext context)LikeB3SingleFormat.writeB3SingleFormat(TraceContext), but for requests with byte array or byte buffer values.static StringB3SingleFormat. writeB3SingleFormatWithoutParentId(TraceContext context)Writes all B3 defined fields in the trace context, exceptparent ID, to a hyphen delimited string.static byte[]B3SingleFormat. writeB3SingleFormatWithoutParentIdAsBytes(TraceContext context)LikeB3SingleFormat.writeB3SingleFormatWithoutParentId(TraceContext), but for requests with byte array or byte buffer values.
-