public class NewRelicApiImplementation
extends java.lang.Object
implements com.newrelic.agent.bridge.PublicApi
DO NOT INVOKE THIS CLASS DIRECTLY. Use NewRelic.
| Constructor and Description |
|---|
NewRelicApiImplementation() |
NewRelicApiImplementation(AttributeSender customSender,
AgentAttributeSender agentSender) |
| Modifier and Type | Method and Description |
|---|---|
void |
addCustomParameter(java.lang.String key,
boolean value)
Add a key/value pair to the current transaction.
|
void |
addCustomParameter(java.lang.String key,
java.lang.Number value)
Add a key/value pair to the current transaction.
|
void |
addCustomParameter(java.lang.String key,
java.lang.String value)
Add a key/value pair to the current transaction.
|
void |
addCustomParameters(java.util.Map<java.lang.String,java.lang.Object> params)
Add key/value pairs to the current transaction.
|
java.lang.String |
getBrowserTimingFooter() |
java.lang.String |
getBrowserTimingFooter(java.lang.String nonce) |
static java.lang.String |
getBrowserTimingFooterForContentType(java.lang.String contentType)
Called by JSPs.
|
java.lang.String |
getBrowserTimingHeader() |
java.lang.String |
getBrowserTimingHeader(java.lang.String nonce) |
static java.lang.String |
getBrowserTimingHeaderForContentType(java.lang.String contentType)
Called by JSPs.
|
void |
ignoreApdex()
Ignore the current transaction for calculating Apdex score.
|
void |
ignoreTransaction()
Ignore the current transaction.
|
static void |
initialize() |
void |
noticeError(java.lang.String message,
java.util.Map<java.lang.String,?> params,
boolean expected) |
void |
noticeError(java.lang.Throwable throwable)
Report an exception to New Relic.
|
void |
noticeError(java.lang.Throwable throwable,
java.util.Map<java.lang.String,?> params)
Notice an exception and report it to New Relic.
|
void |
noticeError(java.lang.Throwable throwable,
java.util.Map<java.lang.String,?> params,
boolean expected) |
void |
setAccountName(java.lang.String name)
Set the account name to associate with the RUM JavaScript footer for the current web transaction.
|
void |
setAppServerPort(int port) |
void |
setErrorGroupCallback(com.newrelic.api.agent.ErrorGroupCallback errorGroupCallback) |
void |
setInstanceName(java.lang.String instanceName) |
void |
setProductName(java.lang.String name)
Set the product name to associate with the RUM JavaScript footer for the current web transaction.
|
void |
setRequestAndResponse(com.newrelic.api.agent.Request request,
com.newrelic.api.agent.Response response) |
void |
setServerInfo(java.lang.String dispatcherName,
java.lang.String version) |
void |
setTransactionName(java.lang.String category,
java.lang.String name)
Set the name of the current transaction.
|
void |
setUserId(java.lang.String userId)
Sets the user ID for the current transaction by adding the "enduser.id" agent attribute.
|
void |
setUserName(java.lang.String name)
Set the user name to associate with the RUM JavaScript footer for the current web transaction.
|
public NewRelicApiImplementation(AttributeSender customSender, AgentAttributeSender agentSender)
public NewRelicApiImplementation()
public void noticeError(java.lang.Throwable throwable,
java.util.Map<java.lang.String,?> params)
noticeError in interface com.newrelic.api.agent.ErrorApithrowable - params - Custom parameters to include in the traced error. May be null. Copied to avoid side effects.public void noticeError(java.lang.Throwable throwable)
noticeError in interface com.newrelic.api.agent.ErrorApithrowable - noticeError(Throwable, Map)public void noticeError(java.lang.Throwable throwable,
java.util.Map<java.lang.String,?> params,
boolean expected)
noticeError in interface com.newrelic.api.agent.ErrorApipublic void noticeError(java.lang.String message,
java.util.Map<java.lang.String,?> params,
boolean expected)
noticeError in interface com.newrelic.api.agent.ErrorApipublic void addCustomParameter(java.lang.String key,
java.lang.String value)
addCustomParameter in interface com.newrelic.agent.bridge.PublicApikey - value - public void addCustomParameter(java.lang.String key,
java.lang.Number value)
addCustomParameter in interface com.newrelic.agent.bridge.PublicApikey - value - public void addCustomParameter(java.lang.String key,
boolean value)
addCustomParameter in interface com.newrelic.agent.bridge.PublicApikey - value - public void addCustomParameters(java.util.Map<java.lang.String,java.lang.Object> params)
addCustomParameters in interface com.newrelic.agent.bridge.PublicApiparams - public void setUserId(java.lang.String userId)
setUserId in interface com.newrelic.agent.bridge.PublicApiuserId - The user ID to report. If it is a null or blank String, the "enduser.id" agent attribute will not be included in the current transaction and any associated errors.public void setTransactionName(java.lang.String category,
java.lang.String name)
setTransactionName in interface com.newrelic.agent.bridge.PublicApicategory - name - The name of the transaction in URI format. example: /store/orderpublic void ignoreTransaction()
ignoreTransaction in interface com.newrelic.agent.bridge.PublicApipublic void ignoreApdex()
ignoreApdex in interface com.newrelic.agent.bridge.PublicApipublic void setRequestAndResponse(com.newrelic.api.agent.Request request,
com.newrelic.api.agent.Response response)
setRequestAndResponse in interface com.newrelic.agent.bridge.PublicApipublic static java.lang.String getBrowserTimingHeaderForContentType(java.lang.String contentType)
NOTE: This method is called by the AbstractRUMState class. It needs to remain static.
GeneratorVisitTracerFactorypublic java.lang.String getBrowserTimingHeader()
getBrowserTimingHeader in interface com.newrelic.agent.bridge.PublicApipublic java.lang.String getBrowserTimingHeader(java.lang.String nonce)
getBrowserTimingHeader in interface com.newrelic.agent.bridge.PublicApipublic static java.lang.String getBrowserTimingFooterForContentType(java.lang.String contentType)
NOTE: This method is called by the AbstractRUMState class. It needs to remain static.
GeneratorVisitTracerFactorypublic java.lang.String getBrowserTimingFooter()
getBrowserTimingFooter in interface com.newrelic.agent.bridge.PublicApipublic java.lang.String getBrowserTimingFooter(java.lang.String nonce)
getBrowserTimingFooter in interface com.newrelic.agent.bridge.PublicApipublic void setUserName(java.lang.String name)
setUserName in interface com.newrelic.agent.bridge.PublicApipublic void setAccountName(java.lang.String name)
setAccountName in interface com.newrelic.agent.bridge.PublicApipublic void setProductName(java.lang.String name)
setProductName in interface com.newrelic.agent.bridge.PublicApipublic void setAppServerPort(int port)
setAppServerPort in interface com.newrelic.agent.bridge.PublicApipublic void setServerInfo(java.lang.String dispatcherName,
java.lang.String version)
setServerInfo in interface com.newrelic.agent.bridge.PublicApipublic void setInstanceName(java.lang.String instanceName)
setInstanceName in interface com.newrelic.agent.bridge.PublicApipublic void setErrorGroupCallback(com.newrelic.api.agent.ErrorGroupCallback errorGroupCallback)
setErrorGroupCallback in interface com.newrelic.api.agent.ErrorApipublic static void initialize()