public class DistributedTraceServiceImpl extends AbstractService implements DistributedTraceService, ConnectionListener, ExtendedTransactionListener, HarvestListener, AgentConfigListener
logger
Constructor and Description |
---|
DistributedTraceServiceImpl() |
Modifier and Type | Method and Description |
---|---|
void |
afterHarvest(java.lang.String appName)
Called after the harvest.
|
void |
beforeHarvest(java.lang.String appName,
StatsEngine statsEngine)
Called before the harvest.
|
float |
calculatePriority(java.lang.Float priority,
DistributedSamplingPriorityQueue reservoir) |
void |
configChanged(java.lang.String appName,
AgentConfig agentConfig) |
void |
connected(IRPMService rpmService,
AgentConfig agentConfig) |
com.newrelic.api.agent.DistributedTracePayload |
createDistributedTracePayload(Tracer tracer) |
void |
disconnected(IRPMService rpmService) |
void |
dispatcherTransactionCancelled(Transaction transaction)
The transaction on the current thread is being cancelled, either because of a serious internal error or because
the activity on the current thread is now linked to another transaction and this transaction should not report.
|
void |
dispatcherTransactionFinished(TransactionData transactionData,
TransactionStats transactionStats)
Called after a dispatcher transaction finishes on the request thread.
|
void |
dispatcherTransactionStarted(Transaction transaction)
Called after a dispatcher transaction is started on the request thread.
|
protected void |
doStart() |
protected void |
doStop() |
java.lang.String |
getAccountId() |
java.lang.String |
getApplicationId() |
java.util.Map<java.lang.String,java.lang.Object> |
getIntrinsics(DistributedTracePayloadImpl inboundPayload,
java.lang.String guid,
java.lang.String traceId,
com.newrelic.agent.bridge.TransportType transportType,
long parentTransportDurationInMillis,
long largestTransportDuration,
java.lang.String parentId,
java.lang.String parentSpanId,
float priority) |
int |
getMajorSupportedCatVersion() |
int |
getMinorSupportedCatVersion() |
java.lang.String |
getTrustKey() |
boolean |
isEnabled()
Is the service enabled.
|
getLogger, getName, isStarted, isStartedOrStarting, isStopped, isStoppedOrStopping, start, stop
public boolean isEnabled()
Service
isEnabled
in interface Service
isEnabled
in interface DistributedTraceService
true
if the service is enabledprotected void doStart() throws java.lang.Exception
doStart
in class AbstractService
java.lang.Exception
protected void doStop() throws java.lang.Exception
doStop
in class AbstractService
java.lang.Exception
public void connected(IRPMService rpmService, AgentConfig agentConfig)
connected
in interface ConnectionListener
public void disconnected(IRPMService rpmService)
disconnected
in interface ConnectionListener
public void beforeHarvest(java.lang.String appName, StatsEngine statsEngine)
HarvestListener
beforeHarvest
in interface HarvestListener
public void afterHarvest(java.lang.String appName)
HarvestListener
afterHarvest
in interface HarvestListener
public int getMajorSupportedCatVersion()
getMajorSupportedCatVersion
in interface DistributedTraceService
public int getMinorSupportedCatVersion()
getMinorSupportedCatVersion
in interface DistributedTraceService
public java.lang.String getAccountId()
getAccountId
in interface DistributedTraceService
public java.lang.String getTrustKey()
getTrustKey
in interface DistributedTraceService
public java.lang.String getApplicationId()
getApplicationId
in interface DistributedTraceService
public float calculatePriority(java.lang.Float priority, DistributedSamplingPriorityQueue reservoir)
calculatePriority
in interface DistributedTraceService
public java.util.Map<java.lang.String,java.lang.Object> getIntrinsics(DistributedTracePayloadImpl inboundPayload, java.lang.String guid, java.lang.String traceId, com.newrelic.agent.bridge.TransportType transportType, long parentTransportDurationInMillis, long largestTransportDuration, java.lang.String parentId, java.lang.String parentSpanId, float priority)
getIntrinsics
in interface DistributedTraceService
public void dispatcherTransactionStarted(Transaction transaction)
ExtendedTransactionListener
dispatcherTransactionStarted
in interface ExtendedTransactionListener
transaction
- The transaction that was just startedpublic void dispatcherTransactionCancelled(Transaction transaction)
ExtendedTransactionListener
dispatcherTransactionCancelled
in interface ExtendedTransactionListener
transaction
- the transaction that is completing abruptly.public void dispatcherTransactionFinished(TransactionData transactionData, TransactionStats transactionStats)
TransactionListener
dispatcherTransactionFinished
in interface TransactionListener
transactionData
- the final data from the transactiontransactionStats
- the final metric information from the transactionpublic com.newrelic.api.agent.DistributedTracePayload createDistributedTracePayload(Tracer tracer)
createDistributedTracePayload
in interface DistributedTraceService
public void configChanged(java.lang.String appName, AgentConfig agentConfig)
configChanged
in interface AgentConfigListener