Skip to content

Commit

Permalink
use info boxes
Browse files Browse the repository at this point in the history
  • Loading branch information
zeitlinger committed Jan 10, 2025
1 parent 217dc46 commit 7dd6e44
Showing 1 changed file with 19 additions and 18 deletions.
37 changes: 19 additions & 18 deletions content/en/docs/languages/java/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -600,7 +608,17 @@ public class OpenTelemetryUsage {
```
<!-- prettier-ignore-end -->

#### 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.
Expand Down Expand Up @@ -655,23 +673,6 @@ public class GlobalOpenTelemetryUsage {
```
<!-- prettier-ignore-end -->

#### 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)
Expand Down

0 comments on commit 7dd6e44

Please sign in to comment.