---
title: "OpenTelemetry Agentless"
description: "Using OpenTelemetry with  sentry-opentelemetry-agentless."
url: https://docs.sentry.io/platforms/java/guides/spring-boot/opentelemetry/setup/agentless/
---

# OpenTelemetry Agentless | Sentry for Spring Boot

If you do not want to use our recommended [Java Agent](https://docs.sentry.io/platforms/java/guides/spring-boot/opentelemetry/setup/agent.md), we also offer a dependency that allows you to use OpenTelemetry with Sentry.

## [Install](https://docs.sentry.io/platforms/java/guides/spring-boot/opentelemetry/setup/agentless.md#install)

In addition to the Sentry Spring Boot SDK, you will need to add `sentry-opentelemetry-agentless-spring` as a dependency:

```groovy
implementation 'io.sentry:sentry-opentelemetry-agentless-spring:8.51.0'
```

*Other available variations of the above snippet: Maven*

## [OpenTelemetry Dependency Alignment](https://docs.sentry.io/platforms/java/guides/spring-boot/opentelemetry/setup/agentless.md#opentelemetry-dependency-alignment)

Sentry's Java OpenTelemetry integrations are tested with a specific OpenTelemetry dependency set. If your application also imports a BOM that manages OpenTelemetry versions, such as Spring Boot dependency management, it can override transitive OpenTelemetry dependencies and create a mixed OpenTelemetry classpath.

Import `io.sentry:sentry-opentelemetry-bom` manually when another BOM manages OpenTelemetry versions in your application.

When using Gradle with Spring dependency management, import Sentry's OpenTelemetry BOM:

```groovy
dependencyManagement {
    imports {
        mavenBom 'io.sentry:sentry-opentelemetry-bom:8.51.0'
    }
}
```

When using Maven, import Sentry's OpenTelemetry BOM before `spring-boot-dependencies`:

```xml
<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>io.sentry</groupId>
            <artifactId>sentry-opentelemetry-bom</artifactId>
            <version>8.51.0</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-dependencies</artifactId>
            <version>${spring-boot.version}</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>
```

If you use `spring-boot-starter-parent`, import Sentry's OpenTelemetry BOM in the child POM's `dependencyManagement` section.

## [Usage](https://docs.sentry.io/platforms/java/guides/spring-boot/opentelemetry/setup/agentless.md#usage)

You'll have to configure both OpenTelemetry and Sentry to see transactions in Sentry and have errors linked to transactions created by OpenTelemetry.

#### [Initializing OpenTelemetry](https://docs.sentry.io/platforms/java/guides/spring-boot/opentelemetry/setup/agentless.md#initializing-opentelemetry)

Our `sentry-opentelemetry-agentless-spring` dependency also adds `opentelemetry-spring-boot-starter` which takes care of configuring OpenTelemetry to work with Sentry.

Enable the Sentry propagator for OpenTelemetry by adding the following to your Spring configuration:

```properties
sentry.dsn=https://<key>@o<orgId>.ingest.sentry.io/<projectId>
sentry.traces-sample-rate=1.0
otel.propagators=tracecontext,baggage,sentry
```

*Other available variations of the above snippet: application.yml*

The Sentry Spring Boot SDK will take care of the rest.
