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
+45-3Lines changed: 45 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,12 +6,33 @@ This SDK allows Dynatrace customers to instrument java applications. This is use
6
6
7
7
This is the official Java implementation of the [Dynatrace OneAgent SDK](https://github.com/Dynatrace/OneAgent-SDK).
8
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" />
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
12
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/).
13
32
-`LICENSE`: license under which the whole SDK and sample applications are published
14
33
34
+
<aname="requirements" />
35
+
15
36
## Requirements
16
37
17
38
- JRE 1.6 or higher
@@ -22,7 +43,11 @@ This is the official Java implementation of the [Dynatrace OneAgent SDK](https:/
22
43
|1.1.0 |>=1.143 |
23
44
|1.0.3 |>=1.135 |
24
45
25
-
## Integrating into your application
46
+
<aname="integration" />
47
+
48
+
## Integration
49
+
50
+
<aname="dependencies" />
26
51
27
52
### Dependencies
28
53
If you want to integrate the OneAgent SDK into your application, just add the following maven dependency:
@@ -38,19 +63,24 @@ If you prefer to integrate the SDK using plain jar file, just download them from
38
63
39
64
The Dynatrace OneAgent SDK for Java has no further dependencies.
40
65
66
+
<aname="troubleshooting" />
67
+
41
68
### Troubleshooting
42
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:
43
70
44
71
-Dcom.dynatrace.oneagent.sdk.debug=true
45
72
46
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).
47
74
75
+
<aname="apiconcepts" />
48
76
49
77
## API Concepts
50
78
51
79
Common concepts of the Dynatrace OneAgent SDK are explained the [Dynatrace OneAgent SDK repository](https://github.com/Dynatrace/OneAgent-SDK).
52
80
53
-
### Get an Api object
81
+
<aname="oneagentsdkobject" />
82
+
83
+
### OneAgentSDK object
54
84
55
85
Use OneAgentSDKFactory.createInstance() to obtain an OneAgentSDK instance. You should reuse this object over the whole application
56
86
and if possible JVM lifetime:
@@ -71,7 +101,9 @@ default:
71
101
72
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).
73
103
74
-
### Common concepts: Tracers
104
+
<aname="tracers" />
105
+
106
+
### Tracers
75
107
76
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.
77
109
@@ -84,11 +116,13 @@ void end();
84
116
```
85
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.
86
118
119
+
<aname="features" />
87
120
88
121
## Features
89
122
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)):
90
123
- outgoing and incoming remote calls
91
124
125
+
<aname="remoting" />
92
126
93
127
### Trace incoming and outgoing remote calls
94
128
@@ -128,6 +162,8 @@ try {
128
162
}
129
163
```
130
164
165
+
<aname="inprocess" />
166
+
131
167
### In process linking
132
168
133
169
You can use the SDK to link inside a single process. To link for eg. an asynchronous execution, you need the following code:
@@ -152,16 +188,22 @@ try {
152
188
}
153
189
```
154
190
191
+
<aname="furtherreading" />
192
+
155
193
## Further readings
156
194
157
195
* <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
158
196
* <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
197
* <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>
160
198
199
+
<aname="help" />
200
+
161
201
## Help & Support
162
202
163
203
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>.
0 commit comments