---
title: Sentry
description: Send agent traces to Sentry's OTLP endpoint for tracing and debugging.
type: instrumentation
keywords:
  - otel
  - opentelemetry
  - tracing
  - observability
  - otlp
  - errors
---

# Sentry

Instrumentation integration for eve. Send agent traces to Sentry's OTLP endpoint for tracing and debugging.

## Install

Add Sentry instrumentation from eve's registry. Sentry ingests OTLP directly, so no Sentry SDK is required:

```bash
eve add instrumentation/sentry
```

## Quick start

Create `agent/instrumentation.ts` and point the OTLP exporter at your project's Sentry traces endpoint:

```ts
// agent/instrumentation.ts
import { defineInstrumentation } from "eve/instrumentation";
import { OTLPHttpProtoTraceExporter, registerOTel } from "@vercel/otel";

export default defineInstrumentation({
  setup: ({ agentName }) =>
    registerOTel({
      serviceName: agentName,
      traceExporter: new OTLPHttpProtoTraceExporter({
        url: process.env.SENTRY_OTLP_TRACES_ENDPOINT!,
        headers: {
          "x-sentry-auth": `sentry sentry_key=${process.env.SENTRY_PUBLIC_KEY}`,
        },
      }),
    }),
});
```

## Configure

Copy the OTLP traces endpoint and public key from your Sentry project under **Settings → Client Keys (DSN)** and expose them as environment variables. Sentry's OTLP intake accepts traces only, and span events are dropped at ingestion. See the [instrumentation guide](/docs/guides/instrumentation) for the trace hierarchy and the `recordInputs`/`recordOutputs` controls.

[Read the full instrumentation documentation](/docs/guides/instrumentation)

---

For a semantic overview of all documentation, see [/sitemap.md](/sitemap.md)

For an index of all available documentation, see [/llms.txt](/llms.txt)

For agent-facing discovery, including API and MCP surfaces, see [/agents.md](/agents.md)