Package com.newrelic.api.agent
-
Interface Summary Interface Description Agent The New Relic Java Agent's API.AiMonitoring This interface defines methods for recording LlmFeedbackMessage events and setting a callback for token calculation.AttributeHolder Cloud This interface defines methods to pass cloud services information to the agent.CloudParameters.Build CloudParameters.ResourceIdParameter Config Provides access to agent configuration settings.DatastoreParameters.Build DatastoreParameters.CollectionParameter DatastoreParameters.DatabaseParameter DatastoreParameters.InstanceParameter DatastoreParameters.OperationParameter DatastoreParameters.SlowQueryParameter DatastoreParameters.SlowQueryWithInputParameter DistributedTracePayload Deprecated. Instead, use the Distributed Tracing APITransaction.insertDistributedTraceHeaders(Headers)
to create a distributed tracing payload andTransaction.acceptDistributedTraceHeaders(TransportType, Headers)
to link the services together.ErrorApi ErrorData Interface that represents information about an exception to be reported to New Relic.ErrorGroupCallback Classes that implement this interface are used to generate grouping keys for errors that will be sent to New Relic.ExternalParameters Interface for passing external parameters into theTracedMethod
's reportAsExternal.GenericParameters.Build GenericParameters.ProcedureParameter GenericParameters.UriParameter Headers The type-specific headers of an inbound or outbound message.HttpParameters.Build HttpParameters.InboundHeadersParameter HttpParameters.ProcedureParameter HttpParameters.UriParameter InboundHeaders The type-specific headers collection of an inbound message.Insights Used to send custom events to Insights.LlmTokenCountCallback An interface for calculating the number of tokens used for a given LLM (Large Language Model) and content.Logger The Java agent's logging interface.MessageConsumeParameters.Build MessageConsumeParameters.DestinationNameParameter MessageConsumeParameters.DestinationTypeParameter MessageConsumeParameters.InboundHeadersParameter MessageProduceParameters.Build MessageProduceParameters.DestinationNameParameter MessageProduceParameters.DestinationTypeParameter MessageProduceParameters.OutboundHeadersParameter MethodTracer Deprecated. MethodTracerFactory Deprecated. MetricAggregator This aggregator allows metrics to be reported which can be viewed through custom dashboards.OutboundHeaders The type-specific headers collection of an outbound messageQueryConverter<T> Callers ofDatastoreParameters
that use slowQuery() or slowQueryWithInput() must implement this interface in order to properly record slow queries for their framework.Request Deprecated. since 3.21.0; useExtendedRequest
instead.Response Deprecated. since 3.41.0; useExtendedResponse
instead.Segment Represents a timed unit of work.Token Tokens are passed between threads to link asynchronous units of work to the originatingTransaction
associated with the token.TracedMethod Represents a single instance of the timing mechanism associated with a method that is instrumented using theTrace
annotation.TraceMetadata Used to provide information about the currently executing trace.Transaction A transaction represents a unit of work in an application. -
Class Summary Class Description CloudParameters Use to report a cloud service that do not match HTTP nor messaging.ConcurrentHashMapHeaders A thread safe implementation ofHeaders
usingConcurrentHashMap
as the backing data structure.DatastoreParameters The input parameters required to report a datastore on theTracedMethod
.DatastoreParameters.Builder ExtendedInboundHeaders ExtendedRequest ARequest
that provides more information for reporting to New Relic.ExtendedResponse AResponse
that provides more information for reporting to New Relic.GenericParameters Parameters required to report a basic external call usingTracedMethod
's reportAsExternal.GenericParameters.Builder HttpParameters Use to report an HTTP external call with cross application tracing.HttpParameters.Builder LlmFeedbackEventAttributes LlmFeedbackEventAttributes.Builder MessageConsumeParameters Creates the parameters to report a message that was pulled from a message queue.MessageConsumeParameters.Builder MessageProduceParameters Creates the parameters to report a message that was sent to a message queue.MessageProduceParameters.Builder NewRelic The New Relic API.SlowQueryDatastoreParameters<T> The input parameters required to report a slow datastore query on theTracedMethod
.SlowQueryWithInputDatastoreParameters<T,I> The input parameters required to report a slow datastore query on theTracedMethod
including a correlating input query. -
Enum Summary Enum Description CloudAccountInfo Identifier for the type of account information.DestinationType Used for specifying destination of a message action.HeaderType Used for specifying header key syntax forInboundHeaders
andOutboundHeaders
.TransactionNamePriority The priority to give to a call toTransaction.setTransactionName(TransactionNamePriority, boolean, String, String...)
.TransportType -
Annotation Types Summary Annotation Type Description Trace If you annotate a method with the Trace annotation it will be automatically timed by the New Relic agent with the following measurements: call count calls per minute total call time standard deviation call time min call time max call time A metric representing these measurements will be reporting inside the call scope of the current transaction (e.g., "/servlets/myservlet") so that New Relic can "break out" the response time of a given transaction by specific called methods.TraceByReturnType A class annotated with TraceByReturnType will cause the New Relic agent to annotate methods with a return type matching Classes specified inTraceByReturnType.traceReturnTypes()
with a @{link com.newrelic.api.agent.Trace} annotation.TraceLambda If you annotate a class with the TraceLambda annotation the New Relic agent will automatically annotate matched methods within the class with a Trace annotation.