You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+72-25Lines changed: 72 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,23 +4,50 @@
4
4
5
5
This SDK allows Dynatrace customers to instrument java applications. This is useful to enhance the visibility for proprietary frameworks or custom frameworks not directly supported by Dynatrace OneAgent out-of-the-box.
6
6
7
-
It provides the Java implementation of the [Dynatrace OneAgent SDK](https://github.com/Dynatrace/OneAgent-SDK).
7
+
This is the official Java implementation of the [Dynatrace OneAgent SDK](https://github.com/Dynatrace/OneAgent-SDK).
8
+
9
+
#### Table of Contents
10
+
11
+
*[Package contents](#package)
12
+
*[Requirements](#requirements)
13
+
*[Integration](#integration)
14
+
* [Dependencies](#dependencies)
15
+
* [Troubleshooting](#troubleshooting)
16
+
*[API Concepts](#apiconcepts)
17
+
* [OneAgentSDK object](#oneagentsdkobject)
18
+
* [Tracers](#tracers)
19
+
*[Features](#features)
20
+
* [Trace incoming and outgoing remote calls](#remoting)
21
+
* [In process linking](#inprocess)
22
+
*[Further reading](#furtherreading)
23
+
*[Help & Support](#help)
24
+
*[Release notes](#releasenotes)
25
+
26
+
<aname="package" />
8
27
9
28
## Package contents
10
29
11
30
-`samples`: contains sample application, which demonstrates the usage of the SDK. see readme inside the samples directory for more details
31
+
-`docs`: contains the reference documentation (javadoc). The most recent version is also available online at [https://dynatrace.github.io/OneAgent-SDK-for-Java/](https://dynatrace.github.io/OneAgent-SDK-for-Java/).
12
32
-`LICENSE`: license under which the whole SDK and sample applications are published
13
33
14
-
## Features
15
-
Dynatrace OneAgent SDK for Java currently implements support for the following features (corresponding to features specified in [Dynatrace OneAgent SDK](https://github.com/Dynatrace/OneAgent-SDK)):
16
-
- outgoing and incoming remote calls
34
+
<aname="requirements" />
35
+
36
+
## Requirements
37
+
38
+
- JRE 1.6 or higher
39
+
- Dynatrace OneAgent (required versions see below)
17
40
18
-
## Documentation
19
-
The reference documentation is included in this package. The most recent version is also available online at [https://dynatrace.github.io/OneAgent-SDK-for-Java/](https://dynatrace.github.io/OneAgent-SDK-for-Java/).
41
+
|OneAgent SDK for Java|Required OneAgent version|
42
+
|:------|:--------|
43
+
|1.1.0 |>=1.143 |
44
+
|1.0.3 |>=1.135 |
20
45
21
-
A high level documentation/description of OneAgent SDK concepts is available at [https://github.com/Dynatrace/OneAgent-SDK/](https://github.com/Dynatrace/OneAgent-SDK/).
46
+
<aname="integration" />
22
47
23
-
## Integrating into your application
48
+
## Integration
49
+
50
+
<aname="dependencies" />
24
51
25
52
### Dependencies
26
53
If you want to integrate the OneAgent SDK into your application, just add the following maven dependency:
@@ -36,23 +63,24 @@ If you prefer to integrate the SDK using plain jar file, just download them from
36
63
37
64
The Dynatrace OneAgent SDK for Java has no further dependencies.
38
65
66
+
<aname="troubleshooting" />
67
+
39
68
### Troubleshooting
40
69
If the SDK can't connect to the OneAgent (see usage of SDKState in samples) or you you don't see the desired result in the Dynatrace UI, you can set the following system property to print debug information to standard out:
41
70
42
71
-Dcom.dynatrace.oneagent.sdk.debug=true
43
72
44
73
Additionally you should/have to ensure, that you have set a `LoggingCallback`. For usage see class `StdErrLoggingCallback` in `remotecall-server` module (in samples/remotecall folder).
45
74
46
-
## OneAgent SDK for Java Requirements
47
-
48
-
- JRE 1.6 or higher
49
-
- Dynatrace OneAgent Java (supported versions see below)
75
+
<aname="apiconcepts" />
50
76
51
-
# API Concepts
77
+
##API Concepts
52
78
53
79
Common concepts of the Dynatrace OneAgent SDK are explained the [Dynatrace OneAgent SDK repository](https://github.com/Dynatrace/OneAgent-SDK).
54
80
55
-
## Get an Api object
81
+
<aname="oneagentsdkobject" />
82
+
83
+
### OneAgentSDK object
56
84
57
85
Use OneAgentSDKFactory.createInstance() to obtain an OneAgentSDK instance. You should reuse this object over the whole application
58
86
and if possible JVM lifetime:
@@ -73,7 +101,9 @@ default:
73
101
74
102
It is good practice to check the SDK state regularly as it may change at every point of time (except PERMANENTLY_INACTIVE never changes over JVM lifetime).
75
103
76
-
## Common concepts: Tracers
104
+
<aname="tracers" />
105
+
106
+
### Tracers
77
107
78
108
To trace any kind of call you first need to create a Tracer. The Tracer object represents the logical and physical endpoint that you want to call. A Tracer serves two purposes. First to time the call (duraction, cpu and more) and report errors. That is why each Tracer has these three methods. The error method must be called only once, and it must be in between start and end.
79
109
@@ -86,8 +116,17 @@ void end();
86
116
```
87
117
The second purpose of a Tracer is to allow tracing across process boundaries. To achieve that these kind of traces supply so called tags. Tags are strings or byte arrays that enable Dynatrace to trace a transaction end to end. As such the tag is the one information that you need to transport across these calls yourselfs.
88
118
119
+
<aname="features" />
89
120
90
-
## Using the Dynatrace OneAgent SDK to trace remote calls
121
+
## Features
122
+
123
+
The feature sets differ slightly with each language implementation. More functionality will be added over time, see <ahref="https://answers.dynatrace.com/spaces/483/dynatrace-product-ideas/idea/198106/planned-features-for-oneagent-sdk.html"target="_blank">Planned features for OneAgent SDK</a> for details on upcoming features.
124
+
125
+
A more detailed specification of the features can be found in [Dynatrace OneAgent SDK](https://github.com/Dynatrace/OneAgent-SDK).
126
+
127
+
<aname="remoting" />
128
+
129
+
### Trace incoming and outgoing remote calls
91
130
92
131
You can use the SDK to trace proprietary IPC communication from one process to the other. This will enable you to see full Service Flow, PurePath and Smartscape topology for remoting technologies that Dynatrace is not aware of.
93
132
@@ -125,7 +164,9 @@ try {
125
164
}
126
165
```
127
166
128
-
## Using the Dynatrace OneAgent SDK for in-process-linking
167
+
<aname="inprocess" />
168
+
169
+
### In process linking
129
170
130
171
You can use the SDK to link inside a single process. To link for eg. an asynchronous execution, you need the following code:
131
172
```Java
@@ -149,17 +190,23 @@ try {
149
190
}
150
191
```
151
192
152
-
### Compatibility OneAgent SDK for Java releases with OneAgent for Java releases
153
-
|OneAgent SDK for Java|Dynatrace OneAgent Java|
154
-
|:------|:--------|
155
-
|1.1.0 |>=1.143 |
156
-
|1.0.3 |>=1.135 |
193
+
<aname="furtherreading" />
194
+
195
+
## Further readings
196
+
197
+
* <ahref="https://www.dynatrace.com/support/help/extend-dynatrace/oneagent-sdk/what-is-oneagent-sdk/"target="_blank">What is the OneAgent SDK?</a> in the Dynatrace documentation
198
+
* <ahref="https://answers.dynatrace.com/spaces/483/dynatrace-product-ideas/idea/198106/planned-features-for-oneagent-sdk.html"target="_blank">Feedback & Roadmap thread in AnswerHub</a>
199
+
* <ahref="https://www.dynatrace.com/news/blog/dynatrace-oneagent-sdk-for-java-end-to-end-monitoring-for-proprietary-java-frameworks/"target="_blank">Blog: Dynatrace OneAgent SDK for Java: End-to-end monitoring for proprietary Java frameworks</a>
200
+
201
+
<aname="help" />
202
+
203
+
## Help & Support
157
204
158
-
## Feedback
205
+
The Dynatrace OneAgent SDK is an open source project, in beta status. Feedback and feature requests can be filed directly on GitHub or on the <ahref="https://answers.dynatrace.com/spaces/483/dynatrace-product-ideas/idea/198106/planned-features-for-oneagent-sdk.html"target="_blank">Feedback & Roadmap thread in AnswerHub</a>.
159
206
160
-
In case of questions, issues or feature requests feel free to contact the maintainer by dynatrace.oneagent.sdk(at)dynatrace(dot)com or file an issue. Your feedback is welcome!
|1.1.0 |Added support for in-process-linking |[binary](https://search.maven.org/remotecontent?filepath=com/dynatrace/oneagent/sdk/java/oneagent-sdk/1.1.0/oneagent-sdk-1.1.0.jar)[source](https://search.maven.org/remotecontent?filepath=com/dynatrace/oneagent/sdk/java/oneagent-sdk/1.0.3/oneagent-sdk-1.0.3-sources.jar)[javadoc](https://search.maven.org/remotecontent?filepath=com/dynatrace/oneagent/sdk/java/oneagent-sdk/1.0.3/oneagent-sdk-1.1.0-javadoc.jar)|
0 commit comments