public class NewRelicApiImplementation
extends java.lang.Object
implements com.newrelic.agent.bridge.PublicApi
NewRelic
.Constructor and Description |
---|
NewRelicApiImplementation() |
NewRelicApiImplementation(AttributeSender sender) |
Modifier and Type | Method and Description |
---|---|
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() |
static java.lang.String |
getBrowserTimingFooterForContentType(java.lang.String contentType)
Called by JSPs.
|
java.lang.String |
getBrowserTimingHeader() |
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)
Report an error to New Relic.
|
void |
noticeError(java.lang.String message,
boolean expected) |
void |
noticeError(java.lang.String message,
java.util.Map<java.lang.String,? extends java.lang.Object> params)
Notice an error and report it to New Relic.
|
void |
noticeError(java.lang.String message,
java.util.Map<java.lang.String,? extends java.lang.Object> params,
boolean expected) |
void |
noticeError(java.lang.Throwable throwable)
Report an exception to New Relic.
|
void |
noticeError(java.lang.Throwable throwable,
boolean expected) |
void |
noticeError(java.lang.Throwable throwable,
java.util.Map<java.lang.String,? extends java.lang.Object> params)
Notice an exception and report it to New Relic.
|
void |
noticeError(java.lang.Throwable throwable,
java.util.Map<java.lang.String,? extends java.lang.Object> 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 |
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 |
setUserName(java.lang.String name)
Set the user name to associate with the RUM JavaScript footer for the current web transaction.
|
public NewRelicApiImplementation(AttributeSender sender)
public NewRelicApiImplementation()
public void noticeError(java.lang.Throwable throwable, java.util.Map<java.lang.String,? extends java.lang.Object> params)
noticeError
in interface com.newrelic.agent.bridge.PublicApi
throwable
- 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.agent.bridge.PublicApi
throwable
- noticeError(Throwable, Map)
public void noticeError(java.lang.String message, java.util.Map<java.lang.String,? extends java.lang.Object> params)
noticeError
in interface com.newrelic.agent.bridge.PublicApi
message
- the error messageparams
- Custom parameters to include in the traced error. May be null. Map is copied to avoid side effects.public void noticeError(java.lang.String message)
noticeError
in interface com.newrelic.agent.bridge.PublicApi
message
- the error messagenoticeError(String, Map)
public void noticeError(java.lang.Throwable throwable, java.util.Map<java.lang.String,? extends java.lang.Object> params, boolean expected)
noticeError
in interface com.newrelic.agent.bridge.PublicApi
public void noticeError(java.lang.Throwable throwable, boolean expected)
noticeError
in interface com.newrelic.agent.bridge.PublicApi
public void noticeError(java.lang.String message, java.util.Map<java.lang.String,? extends java.lang.Object> params, boolean expected)
noticeError
in interface com.newrelic.agent.bridge.PublicApi
public void noticeError(java.lang.String message, boolean expected)
noticeError
in interface com.newrelic.agent.bridge.PublicApi
public void addCustomParameter(java.lang.String key, java.lang.String value)
addCustomParameter
in interface com.newrelic.agent.bridge.PublicApi
key
- value
- @public void addCustomParameter(java.lang.String key, java.lang.Number value)
addCustomParameter
in interface com.newrelic.agent.bridge.PublicApi
key
- value
- @public void addCustomParameters(java.util.Map<java.lang.String,java.lang.Object> params)
addCustomParameters
in interface com.newrelic.agent.bridge.PublicApi
params
- public void setTransactionName(java.lang.String category, java.lang.String name)
setTransactionName
in interface com.newrelic.agent.bridge.PublicApi
category
- name
- The name of the transaction in URI format. example: /store/orderpublic void ignoreTransaction()
ignoreTransaction
in interface com.newrelic.agent.bridge.PublicApi
public void ignoreApdex()
ignoreApdex
in interface com.newrelic.agent.bridge.PublicApi
public void setRequestAndResponse(com.newrelic.api.agent.Request request, com.newrelic.api.agent.Response response)
setRequestAndResponse
in interface com.newrelic.agent.bridge.PublicApi
public static java.lang.String getBrowserTimingHeaderForContentType(java.lang.String contentType)
GeneratorVisitTracerFactory
public java.lang.String getBrowserTimingHeader()
getBrowserTimingHeader
in interface com.newrelic.agent.bridge.PublicApi
public static java.lang.String getBrowserTimingFooterForContentType(java.lang.String contentType)
GeneratorVisitTracerFactory
public java.lang.String getBrowserTimingFooter()
getBrowserTimingFooter
in interface com.newrelic.agent.bridge.PublicApi
public void setUserName(java.lang.String name)
setUserName
in interface com.newrelic.agent.bridge.PublicApi
public void setAccountName(java.lang.String name)
setAccountName
in interface com.newrelic.agent.bridge.PublicApi
public void setProductName(java.lang.String name)
setProductName
in interface com.newrelic.agent.bridge.PublicApi
public void setAppServerPort(int port)
setAppServerPort
in interface com.newrelic.agent.bridge.PublicApi
public void setServerInfo(java.lang.String dispatcherName, java.lang.String version)
setServerInfo
in interface com.newrelic.agent.bridge.PublicApi
public void setInstanceName(java.lang.String instanceName)
setInstanceName
in interface com.newrelic.agent.bridge.PublicApi
public static void initialize()