Package com.newrelic.agent.bridge
Interface PublicApi
-
- All Superinterfaces:
com.newrelic.api.agent.ErrorApi
public interface PublicApi extends com.newrelic.api.agent.ErrorApiThe public api interface.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description voidaddCustomParameter(java.lang.String key, boolean value)Add a key/value pair to the current transaction.voidaddCustomParameter(java.lang.String key, java.lang.Number value)Add a key/value pair to the current transaction.voidaddCustomParameter(java.lang.String key, java.lang.String value)Add a key/value pair to the current transaction.voidaddCustomParameters(java.util.Map<java.lang.String,java.lang.Object> params)Add key/value pairs to the current transaction.java.lang.StringgetBrowserTimingFooter()Deprecated.The full browser script is now included when callinggetBrowserTimingHeader()orgetBrowserTimingHeader(String)java.lang.StringgetBrowserTimingFooter(java.lang.String nonce)Deprecated.The full browser script is not included when callinggetBrowserTimingHeader()orgetBrowserTimingHeader(String)java.lang.StringgetBrowserTimingHeader()Get the RUM JavaScript header for the current web transaction.java.lang.StringgetBrowserTimingHeader(java.lang.String nonce)Get the RUM JavaScript header for the current web transaction.voidignoreApdex()Ignore the current transaction for calculating Apdex score.voidignoreTransaction()Ignore the current transaction.voidsetAccountName(java.lang.String name)Set the account name to associate with the RUM JavaScript footer for the current web transaction.voidsetAppServerPort(int port)Set the app server port which is reported to RPM.voidsetInstanceName(java.lang.String instanceName)Set the instance name in the environment.voidsetProductName(java.lang.String name)Set the product name to associate with the RUM JavaScript footer for the current web transaction.voidsetRequestAndResponse(com.newrelic.api.agent.Request request, com.newrelic.api.agent.Response response)Sets the request and response instances for the current transaction.voidsetServerInfo(java.lang.String dispatcherName, java.lang.String version)Set the dispatcher name and version which is reported to RPM.voidsetTransactionName(java.lang.String category, java.lang.String name)Set the name of the current transaction.voidsetUserId(java.lang.String userId)Sets the user ID for the current transaction by adding the "enduser.id" agent attribute.voidsetUserName(java.lang.String name)Set the user name to associate with the RUM JavaScript footer for the current web transaction.
-
-
-
Method Detail
-
addCustomParameter
void addCustomParameter(java.lang.String key, java.lang.Number value)Add a key/value pair to the current transaction. These are reported in errors and transaction traces.- Parameters:
key- Custom parameter key.value- Custom parameter value.
-
addCustomParameter
void addCustomParameter(java.lang.String key, java.lang.String value)Add a key/value pair to the current transaction. These are reported in errors and transaction traces.- Parameters:
key- Custom parameter key.value- Custom parameter value.
-
addCustomParameter
void addCustomParameter(java.lang.String key, boolean value)Add a key/value pair to the current transaction. These are reported in errors and transaction traces.- Parameters:
key- Custom parameter key.value- Custom parameter value.
-
addCustomParameters
void addCustomParameters(java.util.Map<java.lang.String,java.lang.Object> params)
Add key/value pairs to the current transaction. These are reported in errors and transaction traces.- Parameters:
params- Custom parameters to include.
-
setUserId
void setUserId(java.lang.String userId)
Sets the user ID for the current transaction by adding the "enduser.id" agent attribute. It is reported in errors and transaction traces. When high security mode is enabled, this method call will do nothing.- Parameters:
userId- 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.
-
setTransactionName
void setTransactionName(java.lang.String category, java.lang.String name)Set the name of the current transaction.- Parameters:
category- Metric category. If the input is null, then the default will be used.name- The name of the transaction starting with a forward slash. example: /store/order
-
ignoreTransaction
void ignoreTransaction()
Ignore the current transaction.
-
ignoreApdex
void ignoreApdex()
Ignore the current transaction for calculating Apdex score.
-
setRequestAndResponse
void setRequestAndResponse(com.newrelic.api.agent.Request request, com.newrelic.api.agent.Response response)Sets the request and response instances for the current transaction. Use this API to generate web transactions for custom web request dispatchers. Only the first call to setRequestAndResponse will take effect.- Parameters:
request- The current transaction's request.response- The current transaction's response.
-
getBrowserTimingHeader
java.lang.String getBrowserTimingHeader()
Get the RUM JavaScript header for the current web transaction.- Returns:
- RUM JavaScript header for the current web transaction.
-
getBrowserTimingHeader
java.lang.String getBrowserTimingHeader(java.lang.String nonce)
Get the RUM JavaScript header for the current web transaction.- Parameters:
nonce- a random per-request nonce for sites using Content Security Policy (CSP)- Returns:
- RUM JavaScript header for the current web transaction.
-
getBrowserTimingFooter
java.lang.String getBrowserTimingFooter()
Deprecated.The full browser script is now included when callinggetBrowserTimingHeader()orgetBrowserTimingHeader(String)Get the RUM JavaScript footer for the current web transaction.- Returns:
- RUM JavaScript footer for the current web transaction.
-
getBrowserTimingFooter
java.lang.String getBrowserTimingFooter(java.lang.String nonce)
Deprecated.The full browser script is not included when callinggetBrowserTimingHeader()orgetBrowserTimingHeader(String)Get the RUM JavaScript footer for the current web transaction.- Parameters:
nonce- a random per-request nonce for sites using Content Security Policy (CSP)- Returns:
- RUM JavaScript footer for the current web transaction.
-
setUserName
void setUserName(java.lang.String name)
Set the user name to associate with the RUM JavaScript footer for the current web transaction. If high security mode is enabled, this method call does nothing.- Parameters:
name- User name to associate with the RUM JavaScript footer.
-
setAccountName
void setAccountName(java.lang.String name)
Set the account name to associate with the RUM JavaScript footer for the current web transaction.- Parameters:
name- Account name to associate with the RUM JavaScript footer.
-
setProductName
void setProductName(java.lang.String name)
Set the product name to associate with the RUM JavaScript footer for the current web transaction.- Parameters:
name- Product name to associate with the RUM JavaScript footer.
-
setAppServerPort
void setAppServerPort(int port)
Set the app server port which is reported to RPM.- Parameters:
port- the app server port
-
setServerInfo
void setServerInfo(java.lang.String dispatcherName, java.lang.String version)Set the dispatcher name and version which is reported to RPM.- Parameters:
dispatcherName- the dispatcher name that is reported to RPMversion- the version that is reported to RPM
-
setInstanceName
void setInstanceName(java.lang.String instanceName)
Set the instance name in the environment. A single host:port may support multiple JVM instances. The instance name is intended to help the customer identify the specific JVM instance.- Parameters:
instanceName- the instance name to set in the environment
-
-