---
title: "Logs"
description: "Send OpenTelemetry logs directly to Sentry without a Sentry SDK."
url: https://docs.sentry.io/concepts/otlp/direct/logs/
---

# Direct OTLP Logs

This feature is currently in open beta. Please reach out to <feedback-logging@sentry.io> if you have feedback or questions. Features in beta are still in-progress and may have bugs. We recognize the irony.

Send logs directly from your OpenTelemetry SDK to Sentry's OTLP endpoint. You can find your endpoint URL and auth key in [Project settings > Client Keys (DSN)](https://sentry.io/orgredirect/organizations/:orgslug/settings/projects/:projectId/keys/).

## [Environment Variables](https://docs.sentry.io/concepts/otlp/direct/logs.md#environment-variables)

The simplest way to configure your OTel SDK:

`.env`

```bash
export OTEL_EXPORTER_OTLP_LOGS_ENDPOINT="___OTLP_LOGS_URL___"
export OTEL_EXPORTER_OTLP_LOGS_HEADERS="x-sentry-auth=sentry sentry_key=___PUBLIC_KEY___"
```

## [SDK Configuration](https://docs.sentry.io/concepts/otlp/direct/logs.md#sdk-configuration)

You can also configure the exporter directly in your application code. Here's an example with the OTel Node SDK:

`app.ts`

```typescript
import {
  LoggerProvider,
  BatchLogRecordProcessor,
} from "@opentelemetry/sdk-logs";
import { OTLPLogExporter } from "@opentelemetry/exporter-logs-otlp-http";

const logExporter = new OTLPLogExporter({
  url: "___OTLP_LOGS_URL___",
  headers: {
    "x-sentry-auth": "sentry sentry_key=___PUBLIC_KEY___",
  },
});
const loggerProvider = new LoggerProvider({
  processors: [new BatchLogRecordProcessor(logExporter)],
});

const logger = loggerProvider.getLogger("default", "1.0.0");
```

## [Known Limitations](https://docs.sentry.io/concepts/otlp/direct/logs.md#known-limitations)

* Array attributes are partially supported. We ingest and display array attributes, but they cannot be searched, filtered, or aggregated.

## [Using a Collector Instead](https://docs.sentry.io/concepts/otlp/direct/logs.md#using-a-collector-instead)

If you need to collect logs from infrastructure sources (files, syslog, cloud services), see the [Forwarding](https://docs.sentry.io/concepts/otlp/forwarding.md) guides.
