public class Segment
extends java.lang.Object
implements com.newrelic.agent.bridge.TracedActivity, com.newrelic.api.agent.AttributeHolder
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
END_THREAD |
static java.lang.String |
START_THREAD |
static java.lang.String |
UNNAMED_SEGMENT |
| Constructor and Description |
|---|
Segment(Tracer parent,
Tracer tracer)
Construct a new
Segment |
| Modifier and Type | Method and Description |
|---|---|
void |
addCustomAttribute(java.lang.String key,
boolean value) |
void |
addCustomAttribute(java.lang.String key,
java.lang.Number value) |
void |
addCustomAttribute(java.lang.String key,
java.lang.String value) |
void |
addCustomAttributes(java.util.Map<java.lang.String,java.lang.Object> attributes) |
void |
addOutboundRequestHeaders(com.newrelic.api.agent.OutboundHeaders outboundHeaders) |
void |
end() |
void |
endAsync() |
void |
finish() |
void |
finish(java.lang.Throwable t) |
java.lang.String |
getInitiatingThread() |
Tracer |
getParent() |
long |
getParentInitialExclusiveDuration() |
com.newrelic.agent.bridge.TracedMethod |
getTracedMethod() |
Tracer |
getTracer() |
com.newrelic.api.agent.Transaction |
getTransaction() |
void |
ignore() |
void |
ignoreIfUnfinished() |
boolean |
isFinished() |
void |
reportAsExternal(com.newrelic.api.agent.ExternalParameters externalParameters) |
void |
setAsyncThreadName(java.lang.String threadName) |
void |
setMetricName(java.lang.String... metricNameParts) |
void |
setTruncated() |
public static final java.lang.String UNNAMED_SEGMENT
public static final java.lang.String START_THREAD
public static final java.lang.String END_THREAD
public com.newrelic.api.agent.Transaction getTransaction()
getTransaction in interface com.newrelic.api.agent.Segmentpublic void ignore()
ignore in interface com.newrelic.api.agent.Segmentpublic void reportAsExternal(com.newrelic.api.agent.ExternalParameters externalParameters)
reportAsExternal in interface com.newrelic.api.agent.Segmentpublic void setMetricName(java.lang.String... metricNameParts)
setMetricName in interface com.newrelic.api.agent.Segmentpublic void addOutboundRequestHeaders(com.newrelic.api.agent.OutboundHeaders outboundHeaders)
addOutboundRequestHeaders in interface com.newrelic.api.agent.Segmentpublic com.newrelic.agent.bridge.TracedMethod getTracedMethod()
getTracedMethod in interface com.newrelic.agent.bridge.TracedActivitypublic void setAsyncThreadName(java.lang.String threadName)
setAsyncThreadName in interface com.newrelic.agent.bridge.TracedActivitypublic Tracer getParent()
public Tracer getTracer()
public long getParentInitialExclusiveDuration()
public boolean isFinished()
public void ignoreIfUnfinished()
ignoreIfUnfinished in interface com.newrelic.agent.bridge.TracedActivitypublic void finish()
finish in interface com.newrelic.agent.bridge.TracedActivitypublic void end()
end in interface com.newrelic.api.agent.Segmentpublic void endAsync()
endAsync in interface com.newrelic.api.agent.Segmentpublic void addCustomAttribute(java.lang.String key,
java.lang.Number value)
addCustomAttribute in interface com.newrelic.api.agent.AttributeHolderpublic void addCustomAttribute(java.lang.String key,
java.lang.String value)
addCustomAttribute in interface com.newrelic.api.agent.AttributeHolderpublic void addCustomAttribute(java.lang.String key,
boolean value)
addCustomAttribute in interface com.newrelic.api.agent.AttributeHolderpublic void addCustomAttributes(java.util.Map<java.lang.String,java.lang.Object> attributes)
addCustomAttributes in interface com.newrelic.api.agent.AttributeHolderpublic void finish(java.lang.Throwable t)
finish in interface com.newrelic.agent.bridge.TracedActivitypublic java.lang.String getInitiatingThread()
public void setTruncated()