Uses of Class
brave.propagation.TraceContext
| Package | Description |
|---|---|
| brave | |
| 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.ScopedSpanTracer. startScopedSpanWithParent(String name, TraceContext parent)Same asTracer.startScopedSpan(String), except ignores the current trace context.SpanTracer. toSpan(TraceContext context)Converts the context to a Span object after decorating it for propagation -
Uses of TraceContext in brave.handler
Methods in brave.handler with parameters of type TraceContext Modifier and Type Method Description abstract booleanFinishedSpanHandler. handle(TraceContext context, MutableSpan span)This is invoked after a span is finished, allowing data to be modified or reported out of process. -
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)TraceContextPropagation.Factory. decorate(TraceContext context)Decorates the input such that it can propagate extra data, such as a timestamp or a carrier for extra fields.abstract TraceContextCurrentTraceContext. get()Returns the current span in scope or null if there isn't one.TraceContextThreadLocalCurrentTraceContext. get()Methods in brave.propagation with parameters of type TraceContext Modifier and Type Method Description TraceContextOrSamplingFlags.BuilderTraceContextOrSamplingFlags.Builder. context(TraceContext context)static TraceContextOrSamplingFlagsTraceContextOrSamplingFlags. create(TraceContext context)TraceContextExtraFieldPropagation.Factory. decorate(TraceContext context)TraceContextPropagation.Factory. decorate(TraceContext context)Decorates the input such that it can propagate extra data, such as a timestamp or a carrier for extra fields.protected CurrentTraceContext.ScopeCurrentTraceContext. decorateScope(TraceContext currentSpan, CurrentTraceContext.Scope scope)When implementing CurrentTraceContext.newScope(TraceContext), decorate the result before returning it.CurrentTraceContext.ScopeCurrentTraceContext.ScopeDecorator. decorateScope(TraceContext currentSpan, CurrentTraceContext.Scope scope)CurrentTraceContext.ScopeStrictScopeDecorator. decorateScope(TraceContext currentSpan, CurrentTraceContext.Scope scope)Identifies problems by throwing assertion errors when a scope is closed on a different thread.static StringExtraFieldPropagation. get(TraceContext context, String name)Returns the value of the field with the specified key or null if not availablestatic Map<String,String>ExtraFieldPropagation. getAll(TraceContext context)Returns a mapping of any fields in the trace context.voidTraceContext.Injector. inject(TraceContext traceContext, C carrier)Usually calls a setter for each propagation field to send downstream.CurrentTraceContext.ScopeCurrentTraceContext. maybeScope(TraceContext currentSpan)LikeCurrentTraceContext.newScope(TraceContext), except returnsCurrentTraceContext.Scope.NOOPif the given context is already in scope.abstract CurrentTraceContext.ScopeCurrentTraceContext. newScope(TraceContext currentSpan)Sets the current span in scope until the returned object is closed.CurrentTraceContext.ScopeThreadLocalCurrentTraceContext. newScope(TraceContext currentSpan)static voidExtraFieldPropagation. set(TraceContext context, String name, String value)Sets the value of the field with the specified key, or drops if not a configured fieldstatic 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 carriers 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 carriers with byte array or byte buffer values.