# Quarkus instrumentation

[Quarkus](https://quarkus.io/) is an open source framework designed to help
software developers build efficient cloud native applications both with JVM and
Quarkus native image applications.

Quarkus uses extensions to provide optimized support for a wide range of
libraries. The
[Quarkus OpenTelemetry extension](https://quarkus.io/guides/opentelemetry)
provides:

- Out of the box instrumentation
- OpenTelemetry SDK autoconfiguration, supporting almost all system properties
  defined for the [OpenTelemetry SDK](/docs/languages/java/configuration/)
- [Vert.x](https://vertx.io/) based OTLP exporter
- The same instrumentations can be used with native image applications, which
  are not supported by the OpenTelemetry Java agent.

> [!NOTE]
>
> Quarkus OpenTelemetry instrumentation is maintained and supported by Quarkus.
> For details, see [Quarkus community support](https://quarkus.io/support/).

Quarkus can also be instrumented with the [OpenTelemetry Java agent](../agent/)
if you are not running a native image application.

## Getting started

To enable OpenTelemetry in your Quarkus application, add the
`quarkus-opentelemetry` extension dependency to your project.

   <ul class="nav nav-tabs" id="tabs-0" role="tablist">
  <li class="nav-item">
      <button class="nav-link active"
          id="tabs-00-00-tab" data-bs-toggle="tab" data-bs-target="#tabs-00-00" role="tab"
          data-td-tp-persist="maven (`pom.xml`)" aria-controls="tabs-00-00" aria-selected="true">
        Maven (<code>pom.xml</code>)
      </button>
    </li><li class="nav-item">
      <button class="nav-link"
          id="tabs-00-01-tab" data-bs-toggle="tab" data-bs-target="#tabs-00-01" role="tab"
          data-td-tp-persist="gradle (`build.gradle`)" aria-controls="tabs-00-01" aria-selected="false">
        Gradle (<code>build.gradle</code>)
      </button>
    </li>
</ul>

<div class="tab-content" id="tabs-0-content">
    <div class="tab-body tab-pane fade show active"
        id="tabs-00-00" role="tabpanel" aria-labelled-by="tabs-00-00-tab" tabindex="0">
        <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-xml" data-lang="xml"><span class="line"><span class="cl"><span class="nt">&lt;dependency&gt;</span>
</span></span><span class="line"><span class="cl">    <span class="nt">&lt;groupId&gt;</span>io.quarkus<span class="nt">&lt;/groupId&gt;</span>
</span></span><span class="line"><span class="cl">    <span class="nt">&lt;artifactId&gt;</span>quarkus-opentelemetry<span class="nt">&lt;/artifactId&gt;</span>
</span></span><span class="line"><span class="cl"><span class="nt">&lt;/dependency&gt;</span>
</span></span></code></pre></div>
    </div>
    <div class="tab-body tab-pane fade"
        id="tabs-00-01" role="tabpanel" aria-labelled-by="tabs-00-01-tab" tabindex="0">
        <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-kotlin" data-lang="kotlin"><span class="line"><span class="cl"><span class="n">implementation</span><span class="p">(</span><span class="s2">&#34;io.quarkus:quarkus-opentelemetry&#34;</span><span class="p">)</span>
</span></span></code></pre></div>
    </div>
</div>


Only the **tracing** signal is enabled by default. To enable **metrics** and
**logs**, add the following configuration to your `application.properties` file:

```properties
quarkus.otel.metrics.enabled=true
quarkus.otel.logs.enabled=true
```

OpenTelemetry logging is supported by Quarkus 3.16.0+.

For details concerning these and other configuration options, see
[OpenTelemetry configuration reference](https://quarkus.io/guides/opentelemetry#configuration-reference).

## Learn more

- [Using OpenTelemetry](https://quarkus.io/guides/opentelemetry), a general
  reference covering all
  [configuration](https://quarkus.io/guides/opentelemetry#configuration-reference)
  options
- Signal-specific guides for
  - [Tracing](https://quarkus.io/guides/opentelemetry-tracing)
  - [Metrics](https://quarkus.io/guides/opentelemetry-metrics)
  - [Logs](https://quarkus.io/guides/opentelemetry-logging)
