|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface OneAgentSDK
Root interface contains provided Agent SDK API calls. Basically the whole API is designed according to following rules:
| Field Summary | |
|---|---|
static java.lang.String |
DYNATRACE_HTTP_HEADERNAME
Using this headername to transport Dynatrace tag inside an outgoing http request ensures compatibility to Dynatrace built-in sensors. |
static java.lang.String |
DYNATRACE_MESSAGE_PROPERTYNAME
Using this propertyname to transport Dynatrace tag along with the message, ensures compatibility to Dynatrace built-in sensors. |
| Method Summary | |
|---|---|
void |
addCustomRequestAttribute(java.lang.String key,
double value)
Does exactly the same as addCustomRequestAttribute(String, String),
but request-attribute type double. |
void |
addCustomRequestAttribute(java.lang.String key,
long value)
Does exactly the same as addCustomRequestAttribute(String, String),
but request-attribute type long. |
void |
addCustomRequestAttribute(java.lang.String key,
java.lang.String value)
Adds a custom request attribute to currently traced service call. |
DatabaseInfo |
createDatabaseInfo(java.lang.String name,
java.lang.String vendor,
ChannelType channelType,
java.lang.String channelEndpoint)
Initializes a DatabaseInfo instance that is required for tracing database requests. |
InProcessLink |
createInProcessLink()
Creates a link for in-process-linking. |
MessagingSystemInfo |
createMessagingSystemInfo(java.lang.String vendorName,
java.lang.String destinationName,
MessageDestinationType destinationType,
ChannelType channelType,
java.lang.String channelEndpoint)
Initializes a MessagingSystemInfo instance that is required for tracing messages. |
WebApplicationInfo |
createWebApplicationInfo(java.lang.String webServerName,
java.lang.String applicationID,
java.lang.String contextRoot)
Initializes a WebApplicationInfo instance that is required for tracing incoming web requests. |
SDKState |
getCurrentState()
Returns the current SDKState. |
TraceContextInfo |
getTraceContextInfo()
Returns the current W3C trace context for log enrichment (not meant for tagging and context-propagation but for log-enrichment). |
void |
setLoggingCallback(LoggingCallback loggingCallback)
Installs a callback that gets informed, if any SDK action has failed. |
CustomServiceTracer |
traceCustomService(java.lang.String serviceMethod,
java.lang.String serviceName)
Creates a tracer for a custom transaction (Dynatrace calls them Custom service). |
IncomingMessageProcessTracer |
traceIncomingMessageProcess(MessagingSystemInfo messagingSystem)
Creates a tracer for processing (consuming) a received message (onMessage). |
IncomingMessageReceiveTracer |
traceIncomingMessageReceive(MessagingSystemInfo messagingSystem)
Creates a tracer for an incoming asynchronous message (blocking receive). |
IncomingRemoteCallTracer |
traceIncomingRemoteCall(java.lang.String serviceMethod,
java.lang.String serviceName,
java.lang.String serviceEndpoint)
Traces an incoming remote call. |
IncomingWebRequestTracer |
traceIncomingWebRequest(WebApplicationInfo webApplicationInfo,
java.lang.String url,
java.lang.String method)
Traces an incoming web request. |
InProcessLinkTracer |
traceInProcessLink(InProcessLink inProcessLink)
Traces the start of in-process-linking. |
OutgoingMessageTracer |
traceOutgoingMessage(MessagingSystemInfo messagingSystem)
Creates a tracer for an outgoing asynchronous message (send). |
OutgoingRemoteCallTracer |
traceOutgoingRemoteCall(java.lang.String serviceMethod,
java.lang.String serviceName,
java.lang.String serviceEndpoint,
ChannelType channelType,
java.lang.String channelEndpoint)
Traces an outgoing remote call. |
OutgoingWebRequestTracer |
traceOutgoingWebRequest(java.lang.String url,
java.lang.String method)
Traces an outgoing web request. |
DatabaseRequestTracer |
traceSqlDatabaseRequest(DatabaseInfo databaseInfo,
java.lang.String statement)
Creates a tracer for tracing outgoing SQL database requests. |
| Field Detail |
|---|
static final java.lang.String DYNATRACE_HTTP_HEADERNAME
static final java.lang.String DYNATRACE_MESSAGE_PROPERTYNAME
| Method Detail |
|---|
DatabaseInfo createDatabaseInfo(java.lang.String name,
java.lang.String vendor,
ChannelType channelType,
java.lang.String channelEndpoint)
name - name of the databasevendor - database vendor name (e.g. Oracle, MySQL, ...), can be a user defined name
If possible use a constant defined in DatabaseVendorchannelType - communication protocol used to communicate with the database.channelEndpoint - this represents the communication endpoint for the database. This information allows Dynatrace to tie the database requests to a specific process or cloud service. It is optional.
* for TCP/IP: host name/IP of the server-side (can include port in the form of "host:port")
* for UNIX domain sockets: name of domain socket file
* for named pipes: name of pipe
DatabaseInfo instance to work with
DatabaseRequestTracer traceSqlDatabaseRequest(DatabaseInfo databaseInfo,
java.lang.String statement)
databaseInfo - information about databasestatement - database SQL statement
DatabaseRequestTracer to work with
WebApplicationInfo createWebApplicationInfo(java.lang.String webServerName,
java.lang.String applicationID,
java.lang.String contextRoot)
webServerName - logical name of the web server. In case of a cluster every node in
the cluster must report the same name here. Attention: Make sure
not to use the host header for this parameter. Host headers are
often spoofed and contain things like google or baidoo which do
not reflect your setup.applicationID - application ID of the web applicationcontextRoot - context root of the application. All URLs traced with the returned
WebApplicationInfo, should start with provided context root.
WebApplicationInfo instance to work with
IncomingWebRequestTracer traceIncomingWebRequest(WebApplicationInfo webApplicationInfo,
java.lang.String url,
java.lang.String method)
webApplicationInfo - information about web applicationurl - (parts of a) URL, which will be parsed into: scheme,
hostname/port, path & query Note: the hostname will be resolved by
the Agent at start() callmethod - HTTP request method
IncomingWebRequestTracer to work with
OutgoingWebRequestTracer traceOutgoingWebRequest(java.lang.String url,
java.lang.String method)
url - URL, which will be parsed into: scheme, hostname/port, path &
query Note: the hostname will be resolved by the Agent at start()
callmethod - HTTP request method
OutgoingWebRequestTracer to work with
IncomingRemoteCallTracer traceIncomingRemoteCall(java.lang.String serviceMethod,
java.lang.String serviceName,
java.lang.String serviceEndpoint)
serviceMethod - name of the called remote method. (required)serviceName - name of the remote service. (required)serviceEndpoint - endpoint on the server side. (required)
IncomingRemoteCallTracer instance to work with
OutgoingRemoteCallTracer traceOutgoingRemoteCall(java.lang.String serviceMethod,
java.lang.String serviceName,
java.lang.String serviceEndpoint,
ChannelType channelType,
java.lang.String channelEndpoint)
serviceMethod - name of the called remote method. (required)serviceName - name of the remote service. (required)serviceEndpoint - endpoint on the server side. (required)channelType - communication protocol used by remote call. See
ChannelType for available types. (required)channelEndpoint - optional and depending on channelType:
OutgoingRemoteCallTracer instance to work withInProcessLink createInProcessLink()
InProcessLink instance to work with. Use it with
traceInProcessLink(InProcessLink)InProcessLinkTracer traceInProcessLink(InProcessLink inProcessLink)
inProcessLink - a InProcessLink received via createInProcessLink()
InProcessLinkTracer to work with.
void addCustomRequestAttribute(java.lang.String key,
java.lang.String value)
setLoggingCallback(LoggingCallback) if error happened. If two
attributes with same key are set, both attribute-values are captured.
key - key of the attribute. required parameter.value - value of the attribute. required parameter.
void addCustomRequestAttribute(java.lang.String key,
long value)
addCustomRequestAttribute(String, String),
but request-attribute type long.
void addCustomRequestAttribute(java.lang.String key,
double value)
addCustomRequestAttribute(String, String),
but request-attribute type double.
MessagingSystemInfo createMessagingSystemInfo(java.lang.String vendorName,
java.lang.String destinationName,
MessageDestinationType destinationType,
ChannelType channelType,
java.lang.String channelEndpoint)
vendorName - one of MessageSystemVendor if well known vendor. Custom provided in any other case.destinationName - destination name (e.g. queue name, topic name)destinationType - destination type - see MessageDestinationType.channelType - communication protocol usedchannelEndpoint - optional and depending on protocol:
* for TCP/IP: host name/IP of the server-side (can include port)
* for UNIX domain sockets: name of domain socket file
* for named pipes: name of pipe
MessagingSystemInfo instance to work withOutgoingMessageTracer traceOutgoingMessage(MessagingSystemInfo messagingSystem)
messagingSystem - information about the messaging system (see createMessagingSystemInfo methods).
OutgoingMessageTracer to work withIncomingMessageReceiveTracer traceIncomingMessageReceive(MessagingSystemInfo messagingSystem)
messagingSystem - information about the messaging system (see createMessagingSystemInfo methods).
IncomingMessageReceiveTracer to work withIncomingMessageProcessTracer traceIncomingMessageProcess(MessagingSystemInfo messagingSystem)
messagingSystem - information about the messaging system (see createMessagingSystemInfo methods).
IncomingMessageProcessTracer to work withvoid setLoggingCallback(LoggingCallback loggingCallback)
LoggingCallback interface. The provided callback must be
thread-safe, when using this OneAgentSDK instance in multi-threaded
environments.
loggingCallback - may be null, to remove current callback. provided callback
replaces any previously set callback.SDKState getCurrentState()
SDKState for details.
CustomServiceTracer traceCustomService(java.lang.String serviceMethod,
java.lang.String serviceName)
serviceMethod - service method being used for service creation.serviceName - service name being used for service creation.
CustomServiceTracer to work withTraceContextInfo getTraceContextInfo()
TraceContextInfo for details.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||