diff --git a/content/en/docs/instrumentation/java/automatic/spring-boot.md b/content/en/docs/instrumentation/java/automatic/spring-boot.md new file mode 100644 index 000000000000..9f42c102cd46 --- /dev/null +++ b/content/en/docs/instrumentation/java/automatic/spring-boot.md @@ -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 + + + io.opentelemetry.instrumentation + opentelemetry-spring-boot-starter + {{% param vers.instrumentation %}} + + +``` + +{{% /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). diff --git a/static/refcache.json b/static/refcache.json index 2112a2b84daa..0c655232049a 100644 --- a/static/refcache.json +++ b/static/refcache.json @@ -1491,6 +1491,14 @@ "StatusCode": 200, "LastSeen": "2023-07-26T16:17:33.996008+02:00" }, + "https://docs.spring.io/spring-boot/docs/current/reference/html/using.html#using.auto-configuration": { + "StatusCode": 206, + "LastSeen": "2023-11-14T09:30:48.194902-05:00" + }, + "https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#using.build-systems.starters": { + "StatusCode": 200, + "LastSeen": "2023-11-14T09:30:42.69906-05:00" + }, "https://docs.teletrace.io/": { "StatusCode": 206, "LastSeen": "2023-06-30T09:15:08.305928-04:00" @@ -5391,6 +5399,10 @@ "StatusCode": 200, "LastSeen": "2023-06-30T11:44:31.406627-04:00" }, + "https://spring.io/projects/spring-boot": { + "StatusCode": 200, + "LastSeen": "2023-11-14T09:30:36.981189-05:00" + }, "https://square.github.io/okhttp/": { "StatusCode": 206, "LastSeen": "2023-09-14T09:36:37.578867-05:00"