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

# Ruby [Logs]

> OpenTelemetry for Rails, Sinatra, and Rack apps on Tracelit.

## Environment

```bash theme={null}
OTEL_SERVICE_NAME=my-service
OTEL_RESOURCE_ATTRIBUTES=deployment.environment=production
OTEL_EXPORTER_OTLP_ENDPOINT=https://ingest.tracelit.app
OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
OTEL_EXPORTER_OTLP_HEADERS=Authorization=Bearer <WORKSPACE_INGEST_KEY>
```

## Install

```bash theme={null}
bundle add opentelemetry-sdk opentelemetry-exporter-otlp opentelemetry-instrumentation-all
```

Configure at boot (`config/initializers/opentelemetry.rb` for Rails), then bridge your logger:

| Logger              | Description                    | Guide                              |
| ------------------- | ------------------------------ | ---------------------------------- |
| **stdlib Logger**   | Logger / ActiveSupport::Logger | [Read](/otel/ruby/logger)          |
| **Semantic Logger** | Forward SemanticLogger events  | [Read](/otel/ruby/semantic-logger) |
