public interface Tracer
Modifier and Type | Interface and Description |
---|---|
static interface |
Tracer.SpanBuilder |
Modifier and Type | Method and Description |
---|---|
Tracer.SpanBuilder |
buildSpan(String operationName)
Create, start, and return a new Span with the given `operationName`.
|
<T> void |
inject(Span span,
T carrier)
Takes two arguments:
a Span instance, and
a “carrier” object in which to inject that Span for cross-process propagation.
|
<T> Tracer.SpanBuilder |
join(T carrier)
Returns a SpanBuilder provided
a “carrier” object from which to extract identifying information needed by the new Span instance.
|
Tracer.SpanBuilder buildSpan(String operationName)
Example:
Tracer tracer = ...
Span feed = tracer.buildSpan("GetFeed")
.start();
Span http = tracer.buildSpan("HandleHTTPRequest")
.withParent(feed)
.withTag("user_agent", req.UserAgent)
.withTag("lucky_number", 42)
.start();
<T> void inject(Span span, T carrier)
<T> Tracer.SpanBuilder join(T carrier)
Copyright © 2016 OpenTracing. All rights reserved.