Skip to content

Commit 1ff41b1

Browse files
authored
Enable Prettier check over instrumentation/java (open-telemetry#2363)
1 parent 8120fdb commit 1ff41b1

File tree

8 files changed

+317
-266
lines changed

8 files changed

+317
-266
lines changed

.prettierignore

-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ package-lock.json
2323
content/en/docs/instrumentation/cpp
2424
content/en/docs/instrumentation/erlang
2525
content/en/docs/instrumentation/go
26-
content/en/docs/instrumentation/java
2726
content/en/docs/instrumentation/js
2827
content/en/docs/instrumentation/net
2928
content/en/docs/instrumentation/other

content/en/docs/instrumentation/java/_index.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ title: Java
33
description: >-
44
<img width="35" class="img-initial"
55
src="https://raw.githubusercontent.com/open-telemetry/opentelemetry.io/main/iconography/32x32/Java_SDK.svg"
6-
alt="Java"></img>
7-
A language-specific implementation of OpenTelemetry in Java.
6+
alt="Java"></img> A language-specific implementation of OpenTelemetry in Java.
87
aliases: [/java, /java/metrics, /java/tracing]
98
weight: 18
109
cascade:
@@ -73,6 +72,7 @@ dependencies {
7372
```
7473

7574
[maven central]: https://mvnrepository.com/artifact/io.opentelemetry
76-
[opentelemetry-java-docs]: https://github.com/open-telemetry/opentelemetry-java-docs#java-opentelemetry-examples
75+
[opentelemetry-java-docs]:
76+
https://github.com/open-telemetry/opentelemetry-java-docs#java-opentelemetry-examples
7777
[releases]: https://github.com/open-telemetry/opentelemetry-java/releases
7878
[components]: https://github.com/open-telemetry/opentelemetry-java#releases

content/en/docs/instrumentation/java/automatic/_index.md

+27-21
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,21 @@ service or app code, see [Manual instrumentation](../manual).
1717

1818
## Setup
1919

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:
2526
- 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
2829
```
2930
- 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
3435
```
3536

3637
## Configuring the agent
@@ -56,7 +57,8 @@ java -javaagent:path/to/opentelemetry-javaagent.jar \
5657
-jar myapp.jar
5758
```
5859

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:
6062

6163
```sh
6264
java -javaagent:path/to/opentelemetry-javaagent.jar \
@@ -76,8 +78,9 @@ To see the full range of configuration options, see [Agent Configuration][].
7678

7779
## Supported libraries, frameworks, application services, and JVMs
7880

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].
8184

8285
## Troubleshooting
8386

@@ -87,10 +90,13 @@ debug logs. Note that these are quite verbose.
8790
## Next steps
8891

8992
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

Comments
 (0)