public class RPMService extends AbstractService implements IRPMService, EnvironmentChangeListener, AgentConfigListener
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
COLLECT_ERRORS_KEY |
static java.lang.String |
COLLECT_TRACES_KEY |
static java.lang.String |
DATA_REPORT_PERIOD_KEY |
logger| Constructor and Description |
|---|
RPMService(java.util.List<java.lang.String> appNames,
ConnectionConfigListener connectionConfigListener,
ConnectionListener connectionListener,
java.util.List<AgentConnectionEstablishedListener> agentConnectionEstablishedListeners) |
| Modifier and Type | Method and Description |
|---|---|
void |
agentIdentityChanged(AgentIdentity agentIdentity)
This is invoked whenever the identifying environment information changes.
|
void |
configChanged(java.lang.String appName,
AgentConfig agentConfig) |
void |
connect()
This thing ultimately calls
launch() after about 50 billion points of indirection. |
protected void |
doStart() |
protected void |
doStop() |
java.util.List<java.util.List<?>> |
getAgentCommands() |
java.lang.String |
getApplicationLink() |
java.lang.String |
getApplicationName()
Returns the name of the application the rpm service is reporting data for.
|
long |
getConnectionTimestamp()
The timestamp of when the agent connected to the New Relic service.
|
java.lang.String |
getEntityGuid() |
ErrorService |
getErrorService() |
java.lang.String |
getHostString() |
protected java.util.Map<java.lang.String,java.lang.Object> |
getStartOptions()
Returns a map of startup options to be sent to RPM when the RPM service connects.
|
TransactionNamingScheme |
getTransactionNamingScheme() |
void |
harvest(StatsEngine statsEngine) |
void |
harvestNow() |
boolean |
hasEverConnected() |
boolean |
isConnected() |
boolean |
isEnabled()
Is the service enabled.
|
boolean |
isMainApp()
Is this the main application?
|
void |
launch()
Notify RPM that this agent has launched, and obtain the agent run id
|
void |
reconnect() |
void |
sendAnalyticsEvents(int reservoirSize,
int eventsSeen,
java.util.Collection<TransactionEvent> events) |
void |
sendCommandResults(java.util.Map<java.lang.Long,java.lang.Object> commandResults) |
void |
sendCustomAnalyticsEvents(int reservoirSize,
int eventsSeen,
java.util.Collection<? extends com.newrelic.agent.model.CustomInsightsEvent> events) |
void |
sendErrorData(java.util.List<TracedError> errors) |
void |
sendErrorEvents(int reservoirSize,
int eventsSeen,
java.util.Collection<com.newrelic.agent.model.ErrorEvent> events) |
void |
sendLogEvents(java.util.Collection<? extends com.newrelic.agent.model.LogEvent> events) |
void |
sendModules(java.util.List<JarData> jarDataList)
Sends the meta information about the jars used by the application to the New Relic service.
|
java.util.List<java.lang.Long> |
sendProfileData(java.util.List<ProfileData> profiles) |
void |
sendSpanEvents(int reservoirSize,
int eventsSeen,
java.util.Collection<com.newrelic.agent.model.SpanEvent> events) |
void |
sendSqlTraceData(java.util.List<SqlTrace> sqlTraces) |
void |
sendTransactionTraceData(java.util.List<TransactionTrace> traces) |
void |
shutdown()
notify RPM that the agent is shutting down
|
java.lang.String |
toString() |
getLogger, getName, isStarted, isStartedOrStarting, isStopped, isStoppedOrStopping, start, stopclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetLogger, getName, isStarted, isStartedOrStarting, isStopped, isStoppedOrStopping, start, stoppublic static final java.lang.String COLLECT_TRACES_KEY
public static final java.lang.String COLLECT_ERRORS_KEY
public static final java.lang.String DATA_REPORT_PERIOD_KEY
public RPMService(java.util.List<java.lang.String> appNames,
ConnectionConfigListener connectionConfigListener,
ConnectionListener connectionListener,
java.util.List<AgentConnectionEstablishedListener> agentConnectionEstablishedListeners)
public boolean isEnabled()
Serviceprotected void doStart()
throws java.lang.Exception
doStart in class AbstractServicejava.lang.Exceptionprotected java.util.Map<java.lang.String,java.lang.Object> getStartOptions()
public void launch()
throws java.lang.Exception
launch in interface IRPMServicejava.lang.Exceptionpublic java.lang.String getEntityGuid()
getEntityGuid in interface IRPMServicepublic java.lang.String getApplicationLink()
getApplicationLink in interface IRPMServicepublic TransactionNamingScheme getTransactionNamingScheme()
getTransactionNamingScheme in interface IRPMServicepublic void reconnect()
reconnect in interface IRPMServicepublic java.lang.String getHostString()
getHostString in interface IRPMServicepublic java.lang.String toString()
toString in class java.lang.Objectpublic void sendErrorData(java.util.List<TracedError> errors)
sendErrorData in interface IRPMServicepublic java.util.List<java.lang.Long> sendProfileData(java.util.List<ProfileData> profiles) throws java.lang.Exception
sendProfileData in interface IRPMServicejava.lang.Exceptionpublic void sendModules(java.util.List<JarData> jarDataList) throws java.lang.Exception
IRPMServicesendModules in interface IRPMServicejarDataList - The jars which have not yet been sent to the New Relic service.java.lang.Exception - Thrown if a problem sending the jars.public void sendAnalyticsEvents(int reservoirSize,
int eventsSeen,
java.util.Collection<TransactionEvent> events)
throws java.lang.Exception
sendAnalyticsEvents in interface IRPMServicejava.lang.Exceptionpublic void sendCustomAnalyticsEvents(int reservoirSize,
int eventsSeen,
java.util.Collection<? extends com.newrelic.agent.model.CustomInsightsEvent> events)
throws java.lang.Exception
sendCustomAnalyticsEvents in interface IRPMServicejava.lang.Exceptionpublic void sendLogEvents(java.util.Collection<? extends com.newrelic.agent.model.LogEvent> events)
throws java.lang.Exception
sendLogEvents in interface IRPMServicejava.lang.Exceptionpublic void sendSpanEvents(int reservoirSize,
int eventsSeen,
java.util.Collection<com.newrelic.agent.model.SpanEvent> events)
throws java.lang.Exception
sendSpanEvents in interface IRPMServicejava.lang.Exceptionpublic void sendErrorEvents(int reservoirSize,
int eventsSeen,
java.util.Collection<com.newrelic.agent.model.ErrorEvent> events)
throws java.lang.Exception
sendErrorEvents in interface IRPMServicejava.lang.Exceptionpublic void sendSqlTraceData(java.util.List<SqlTrace> sqlTraces) throws java.lang.Exception
sendSqlTraceData in interface IRPMServicejava.lang.Exceptionpublic void sendTransactionTraceData(java.util.List<TransactionTrace> traces) throws java.lang.Exception
sendTransactionTraceData in interface IRPMServicejava.lang.Exceptionpublic ErrorService getErrorService()
getErrorService in interface IRPMServicepublic java.lang.String getApplicationName()
getApplicationName in interface IRPMServicepublic boolean isMainApp()
isMainApp in interface IRPMServicepublic void shutdown()
throws java.lang.Exception
java.lang.Exceptionpublic void harvestNow()
harvestNow in interface IRPMServicepublic java.util.List<java.util.List<?>> getAgentCommands()
throws java.lang.Exception
getAgentCommands in interface IRPMServicejava.lang.Exceptionpublic void sendCommandResults(java.util.Map<java.lang.Long,java.lang.Object> commandResults)
throws java.lang.Exception
sendCommandResults in interface IRPMServicejava.lang.Exceptionpublic void connect()
launch() after about 50 billion points of indirection.public boolean isConnected()
isConnected in interface IRPMServicepublic boolean hasEverConnected()
hasEverConnected in interface IRPMServicepublic void harvest(StatsEngine statsEngine)
harvest in interface IRPMServiceprotected void doStop()
doStop in class AbstractServicepublic long getConnectionTimestamp()
IRPMServicegetConnectionTimestamp in interface IRPMServicepublic void agentIdentityChanged(AgentIdentity agentIdentity)
EnvironmentChangeListeneragentIdentityChanged in interface EnvironmentChangeListenerpublic void configChanged(java.lang.String appName,
AgentConfig agentConfig)
configChanged in interface AgentConfigListener