@@ -17,20 +17,21 @@ service or app code, see [Manual instrumentation](../manual).
17
17
18
18
## Setup
19
19
20
- 1 . Download [ opentelemetry-javaagent.jar] [ ] from [ Releases] [ ] of the
21
- ` opentelemetry-java-instrumentation ` repo and place the JAR in your preferred directory.
22
- The JAR file contains the agent and instrumentation libraries.
23
- 2 . Add ` -javaagent:path/to/opentelemetry-javaagent.jar ` and other config
24
- to your JVM's startup arguments and launch your app:
20
+ 1 . Download [ opentelemetry-javaagent.jar] [ ] from [ Releases] [ ] of the
21
+ ` opentelemetry-java-instrumentation ` repo and place the JAR in your
22
+ preferred directory. The JAR file contains the agent and instrumentation
23
+ libraries.
24
+ 2 . Add ` -javaagent:path/to/opentelemetry-javaagent.jar ` and other config to
25
+ your JVM's startup arguments and launch your app:
25
26
- Directly on the startup command:
26
- ``` console
27
- $ java -javaagent:path/to/opentelemetry-javaagent.jar -Dotel.service.name=your-service-name -jar myapp.jar
27
+ ``` shell
28
+ java -javaagent:path/to/opentelemetry-javaagent.jar -Dotel.service.name=your-service-name -jar myapp.jar
28
29
```
29
30
- Via the ` JAVA_TOOL_OPTIONS` and other environment variables:
30
- ```console
31
- $ export JAVA_TOOL_OPTIONS="-javaagent:path/to/opentelemetry-javaagent.jar"
32
- $ export OTEL_SERVICE_NAME="your-service-name"
33
- $ java -jar myapp.jar
31
+ ` ` ` shell
32
+ export JAVA_TOOL_OPTIONS=" -javaagent:path/to/opentelemetry-javaagent.jar"
33
+ export OTEL_SERVICE_NAME=" your-service-name"
34
+ java -jar myapp.jar
34
35
` ` `
35
36
36
37
# # Configuring the agent
@@ -56,7 +57,8 @@ java -javaagent:path/to/opentelemetry-javaagent.jar \
56
57
-jar myapp.jar
57
58
` ` `
58
59
59
- You can also supply a Java properties file and load configuration values from there:
60
+ You can also supply a Java properties file and load configuration values from
61
+ there:
60
62
61
63
` ` ` sh
62
64
java -javaagent:path/to/opentelemetry-javaagent.jar \
@@ -76,8 +78,9 @@ To see the full range of configuration options, see [Agent Configuration][].
76
78
77
79
# # Supported libraries, frameworks, application services, and JVMs
78
80
79
- The Java agent ships with instrumentation libraries for many popular components.
80
- For the full list, see [ Supported libraries, frameworks, application services, and JVMs] [ support ] .
81
+ The Java agent ships with instrumentation libraries for many popular components.
82
+ For the full list, see [Supported libraries, frameworks, application services,
83
+ and JVMs][support].
81
84
82
85
# # Troubleshooting
83
86
@@ -87,10 +90,13 @@ debug logs. Note that these are quite verbose.
87
90
# # Next steps
88
91
89
92
After you have automatic instrumentation configured for your app or service, you
90
- might want to [ annotate] ( annotations ) selected methods or add [ manual
91
- instrumentation] ( ../manual ) to collect custom telemetry data.
92
-
93
- [ Agent Configuration ] : agent-config
94
- [ opentelemetry-javaagent.jar ] : https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/latest/download/opentelemetry-javaagent.jar
95
- [ releases ] : https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases
96
- [ support ] : https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/docs/supported-libraries.md
93
+ might want to [annotate](annotations) selected methods or add
94
+ [manual instrumentation](../manual) to collect custom telemetry data.
95
+
96
+ [agent configuration]: agent-config
97
+ [opentelemetry-javaagent.jar]:
98
+ https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/latest/download/opentelemetry-javaagent.jar
99
+ [releases]:
100
+ https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases
101
+ [support]:
102
+ https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/docs/supported-libraries.md
0 commit comments