|
|||||||||
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. |
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. |
InProcessLink |
createInProcessLink()
Creates a link for in-process-linking. |
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. |
void |
setLoggingCallback(LoggingCallback loggingCallback)
Installs a callback that gets informed, if any SDK action has failed. |
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. |
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. |
Field Detail |
---|
static final java.lang.String DYNATRACE_HTTP_HEADERNAME
Method Detail |
---|
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 withIncomingWebRequestTracer 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 withOutgoingWebRequestTracer 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 withIncomingRemoteCallTracer 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 withOutgoingRemoteCallTracer 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.
void 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.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |