public class APMSpan extends Object
| Constructor and Description |
|---|
APMSpan(APMSpanBuilder builder,
TraceReporter reporter) |
| Modifier and Type | Method and Description |
|---|---|
Iterable<Map.Entry<String,String>> |
baggageItems() |
void |
close() |
io.opentracing.SpanContext |
context() |
void |
finish() |
void |
finish(long finishMicros) |
Map<String,String> |
getBaggage() |
String |
getBaggageItem(String arg0) |
Duration |
getDuration() |
protected String |
getInteractionId() |
List<io.opentracing.AbstractSpan.LogData> |
getLogs() |
protected NodeBuilder |
getNodeBuilder()
This method returns the node builder associated with the span.
|
protected String |
getNodePath() |
String |
getOperationName() |
Instant |
getStart() |
Map<String,Object> |
getTags() |
protected TraceContext |
getTraceContext()
This method returns the trace context associated with the span.
|
protected void |
init(APMSpanBuilder builder,
TraceReporter reporter) |
protected void |
initChildOf(APMSpanBuilder builder,
TraceReporter reporter,
io.opentracing.AbstractSpanBuilder.Reference ref)
This method initialises the span based on a 'child-of' relationship.
|
protected void |
initFollowsFrom(APMSpanBuilder builder,
TraceReporter reporter,
io.opentracing.AbstractSpanBuilder.Reference ref)
This method initialises the span based on a 'follows-from' relationship.
|
protected void |
initTopLevelState(APMSpan topSpan,
TraceReporter reporter)
This method initialises the node builder and trace context for a top level
trace fragment.
|
io.opentracing.Span |
log(long arg0,
Map<String,?> arg1) |
io.opentracing.Span |
log(long arg0,
String arg1) |
io.opentracing.Span |
log(long arg0,
String arg1,
Object arg2) |
io.opentracing.Span |
log(Map<String,?> arg0) |
io.opentracing.Span |
log(String arg0) |
io.opentracing.Span |
log(String arg0,
Object arg1) |
io.opentracing.AbstractSpan |
setBaggageItem(String arg0,
String arg1) |
protected void |
setInteractionId(String id,
NodeType nodeType) |
io.opentracing.Span |
setOperationName(String arg0) |
io.opentracing.Span |
setTag(String arg0,
boolean arg1) |
io.opentracing.Span |
setTag(String arg0,
Number arg1) |
io.opentracing.Span |
setTag(String arg0,
String arg1) |
public APMSpan(APMSpanBuilder builder, TraceReporter reporter)
builder - The span builderreporter - The trace reporterprotected void init(APMSpanBuilder builder, TraceReporter reporter)
protected void initTopLevelState(APMSpan topSpan, TraceReporter reporter)
topSpan - The top level span in the tracereporter - The trace reporterprotected void initChildOf(APMSpanBuilder builder, TraceReporter reporter, io.opentracing.AbstractSpanBuilder.Reference ref)
builder - The span builderreporter - The trace reporterref - The 'child-of' relationshipprotected void initFollowsFrom(APMSpanBuilder builder, TraceReporter reporter, io.opentracing.AbstractSpanBuilder.Reference ref)
builder - The span builderreporter - The trace reporterref - The 'follows-from' relationshipprotected String getInteractionId()
protected String getNodePath()
public void finish()
finish in interface io.opentracing.Spanpublic void finish(long finishMicros)
finish in interface io.opentracing.Spanprotected NodeBuilder getNodeBuilder()
protected TraceContext getTraceContext()
public final io.opentracing.SpanContext context()
context in interface io.opentracing.Spanpublic final String getOperationName()
public io.opentracing.Span setOperationName(String arg0)
setOperationName in interface io.opentracing.Spanpublic final Instant getStart()
public final Duration getDuration()
public final void close()
close in interface io.opentracing.Spanclose in interface AutoCloseablepublic final io.opentracing.Span setTag(String arg0, String arg1)
setTag in interface io.opentracing.Spanpublic final io.opentracing.Span setTag(String arg0, boolean arg1)
setTag in interface io.opentracing.Spanpublic final io.opentracing.Span setTag(String arg0, Number arg1)
setTag in interface io.opentracing.Spanpublic io.opentracing.AbstractSpan setBaggageItem(String arg0, String arg1)
setBaggageItem in interface io.opentracing.Spanpublic String getBaggageItem(String arg0)
getBaggageItem in interface io.opentracing.Spanpublic final Iterable<Map.Entry<String,String>> baggageItems()
baggageItems in interface io.opentracing.SpanContextpublic final io.opentracing.Span log(String arg0)
log in interface io.opentracing.Spanpublic final io.opentracing.Span log(long arg0,
String arg1)
log in interface io.opentracing.Spanpublic final io.opentracing.Span log(Map<String,?> arg0)
log in interface io.opentracing.Spanpublic final io.opentracing.Span log(long arg0,
Map<String,?> arg1)
log in interface io.opentracing.Spanpublic final io.opentracing.Span log(String arg0, Object arg1)
log in interface io.opentracing.Spanpublic final io.opentracing.Span log(long arg0,
String arg1,
Object arg2)
log in interface io.opentracing.Spanpublic final List<io.opentracing.AbstractSpan.LogData> getLogs()
Copyright © 2015–2016 Red Hat, Inc.. All rights reserved.