-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add documentation on the OTel Spring Boot starter (#3377)
Co-authored-by: Patrice Chalin <[email protected]> Co-authored-by: svrnm <[email protected]>
- Loading branch information
1 parent
1b54090
commit 2b18b55
Showing
2 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
58 changes: 58 additions & 0 deletions
58
content/en/docs/instrumentation/java/automatic/spring-boot.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
--- | ||
title: Spring Boot | ||
linkTitle: Spring Boot | ||
weight: 30 | ||
description: Spring instrumentation for OpenTelemetry Java | ||
cSpell:ignore: autoconfigure springboot | ||
--- | ||
|
||
You can use the [OpenTelemetry Java agent](..) with byte code instrumentation to | ||
automatically instrument a [Spring Boot](https://spring.io/projects/spring-boot) | ||
application; or you can also use the OpenTelemetry [Spring Boot starter] to | ||
instrument your application. | ||
|
||
[Spring Boot starter]: | ||
https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#using.build-systems.starters | ||
|
||
The OpenTelemetry starter is compatible with Spring Boot 2.0 and 3.0, and Spring | ||
native. | ||
|
||
## Configuration | ||
|
||
Add the dependency given below to enable the OpenTelemetry starter. | ||
|
||
The OpenTelemetry starter uses OpenTelemetry Spring Boot [auto-configuration]. | ||
For details concerning supported libraries and features of the OpenTelemetry | ||
auto-configuration, see the configuration [README]. | ||
|
||
[auto-configuration]: | ||
https://docs.spring.io/spring-boot/docs/current/reference/html/using.html#using.auto-configuration | ||
[README]: | ||
https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/instrumentation/spring/spring-boot-autoconfigure/README.md#features | ||
|
||
{{< tabpane text=true >}} {{% tab header="Maven (`pom.xml`)" lang=Maven %}} | ||
|
||
```xml | ||
<dependencies> | ||
<dependency> | ||
<groupId>io.opentelemetry.instrumentation</groupId> | ||
<artifactId>opentelemetry-spring-boot-starter</artifactId> | ||
<version>{{% param vers.instrumentation %}}</version> | ||
</dependency> | ||
</dependencies> | ||
``` | ||
|
||
{{% /tab %}} {{% tab header="Gradle (`gradle.build`)" lang=Gradle %}} | ||
|
||
```groovy | ||
dependencies { | ||
implementation('io.opentelemetry.instrumentation:opentelemetry-spring-boot-starter:{{% param vers.instrumentation %}}') | ||
} | ||
``` | ||
|
||
{{% /tab %}} {{< /tabpane>}} | ||
|
||
## Additional instrumentations | ||
|
||
You can configure additional instrumentations with | ||
[OpenTelemetry instrumentations libraries](https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/docs/supported-libraries.md#libraries--frameworks). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters