> ## Documentation Index
> Fetch the complete documentation index at: https://docs.openlayer.com/llms.txt
> Use this file to discover all available pages before exploring further.

# OpenTelemetry

> Learn how to export OpenTelemetry data to Openlayer

<img width="700" style={{ borderRadius: "0.5rem" }} src="https://mintcdn.com/openlayer-44/zlWrng2mbxttdDP9/images/integrations/otel_hero.png?fit=max&auto=format&n=zlWrng2mbxttdDP9&q=85&s=56ec38d22c9ff2dae8d6f84d4468eb2c" alt="OTel hero" data-path="images/integrations/otel_hero.png" />

[OpenTelemetry](https://opentelemetry.io/docs/) (OTel) is an open-source framework used to collect observability data. It
It is widely used by frameworks like [Semantic Kernel](https://devblogs.microsoft.com/semantic-kernel/observability-in-semantic-kernel/),
[Vercel AI SDK](https://sdk.vercel.ai/docs/ai-sdk-core/telemetry),
[Spring AI](https://docs.spring.io/spring-ai/reference/observability/index.html), and others.

You can configure Openlayer as the backend for your OTel trace data. If you are already
using a framework that captures OTel traces, you can point it to [Openlayer’s OTel endpoint](#opentelemetry-endpoint) to export
traces and monitor your AI system.

## OpenTelemetry endpoint

Openlayer accepts OTel traces at the following endpoint: `https://api.openlayer.com/v1/otel`.
This endpoint uses the [OTLP protocol](https://opentelemetry.io/docs/specs/otel/protocol/) and expects telemetry data in **protobuf** format over **HTTPS**.

Most OTel-instrumented SDKs use this format by default, but be sure to check your SDK’s documentation
to confirm your setup.

To send OTel data to Openlayer, configure your SDK to use the endpoint above and include
the correct authentication headers. This is typically done using the environment variables shown below.

```bash theme={null}
OTEL_EXPORTER_OTLP_ENDPOINT=https://api.openlayer.com/v1/otel
OTEL_EXPORTER_OTLP_HEADERS="Authorization=Bearer YOUR_OPENLAYER_API_KEY, x-bt-parent=pipeline_id:YOUR_OPENLAYER_PIPELINE_ID"
```

<Info>
  If you use an OTel Collector that requires signal-specific environment
  variables, the export endpoint must be
  `https://api.openlayer.com/v1/otel/v1/traces`.
</Info>

## Property mapping

When Openlayer receives OTel data, it transforms it into its own trace format.
This involves mapping properties from the [GenAI semantic convention](https://opentelemetry.io/docs/specs/semconv/attributes-registry/gen-ai/)
and popular frameworks into Openlayer’s trace data model.

<Warning>
  The OTel GenAI semantic convention is still evolving. If an integration does
  not work as expected or if Openlayer does not parse all attributes correctly,
  please [reach out](mailto:support@openlayer.com).
</Warning>

## Libraries and frameworks with OpenTelemetry support

Any OpenTelemetry-compatible instrumentation can be used to export traces to Openlayer.

The libraries and frameworks below are already instrumented for OpenTelemetry and traces
can be exported to Openlayer.

Check out their dedicated integration guides to learn how to set it up:

* [OpenLLMetry](/integrations/openllmetry)
* [OpenLIT](/integrations/openlit)
* [Semantic Kernel](/integrations/semantic-kernel)
* [Spring AI](/integrations/spring-ai)
* [Pydantic AI](/integrations/pydantic-ai)
* [Strands Agents](/integrations/strands-agents)
