From 7dd6e4496109ba45ca7967a95d8d756230ba127b Mon Sep 17 00:00:00 2001 From: Gregor Zeitlinger Date: Fri, 10 Jan 2025 10:26:55 +0100 Subject: [PATCH] use info boxes --- content/en/docs/languages/java/api.md | 37 ++++++++++++++------------- 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/content/en/docs/languages/java/api.md b/content/en/docs/languages/java/api.md index 2a4c4bc55e9d..f60edc3d6904 100644 --- a/content/en/docs/languages/java/api.md +++ b/content/en/docs/languages/java/api.md @@ -560,6 +560,14 @@ public class AttributesUsage { ### OpenTelemetry +{{% alert title="Spring Boot Starter" %}} +The Spring Boot starter is a special case where `OpenTelemetry` is available as +a Spring bean. Simply inject `OpenTelemetry` into your Spring components. + +Read more about +[extending the Spring Boot starter with custom manual instrumentation](/docs/zero-code/java/spring-boot-starter/api/). +{{% /alert %}} + [OpenTelemetry](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-api/latest/io/opentelemetry/api/OpenTelemetry.html) is a holder for top-level API components which is convenient to pass to instrumentation. @@ -600,7 +608,17 @@ public class OpenTelemetryUsage { ``` -#### GlobalOpenTelemetry +### GlobalOpenTelemetry + + +{{% alert title="Java agent" %}} +The Java agent is a special case where `GlobalOpenTelemetry` is set by the +agent. Simply call `GlobalOpenTelemetry.get()` to access the `OpenTelemetry` +instance. + +Read more about +[extending the Java agent with custom manual instrumentation](/docs/zero-code/java/agent/api/). +{{% /alert %}} [GlobalOpenTelemetry](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-api/latest/io/opentelemetry/api/GlobalOpenTelemetry.html) holds a global singleton [OpenTelemetry](#opentelemetry) instance. @@ -655,23 +673,6 @@ public class GlobalOpenTelemetryUsage { ``` -#### OpenTelemetry in Java agent - -The Java agent is a special case where `GlobalOpenTelemetry` is set by the -agent. Simply call `GlobalOpenTelemetry.get()` to access the `OpenTelemetry` -instance. - -Read more about -[extending the Java agent with custom manual instrumentation](/docs/zero-code/java/agent/api/). - -#### OpenTelemetry in Spring Boot starter - -The Spring Boot starter is a special case where `OpenTelemetry` is available as -a Spring bean. Simply inject `OpenTelemetry` into your Spring components. - -Read more about -[extending the Spring Boot starter with custom manual instrumentation](/docs/zero-code/java/spring-boot-starter/api/). - ### TracerProvider [TracerProvider](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-api/latest/io/opentelemetry/api/trace/TracerProvider.html)