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

# Parseable

> Send OpenLIT traces, metrics and logs to Parseable through an OpenTelemetry Collector

Send OpenLIT traces, metrics and logs to Parseable through an OpenTelemetry Collector.

### 1. Configure OpenTelemetry Collector

Parseable requires different dataset and source headers for each signal. Configure the Collector to add those headers and route each signal to its dataset.

**Install the Collector**

Skip installation when you run a Collector. To install one, follow the [OpenTelemetry Collector installation guide](https://opentelemetry.io/docs/collector/installation/).

**Configure the Collector**

The Collector accepts OTLP over HTTP and gRPC and sends each signal to a separate Parseable dataset.

<Accordion title="Collector configuration">
  ```yaml theme={"theme":{"light":"github-light","dark":"github-dark"}}
  receivers:
    otlp:
      protocols:
        grpc:
          endpoint: 0.0.0.0:4317
        http:
          endpoint: 0.0.0.0:4318

  processors:
    batch:
    memory_limiter:
      limit_mib: 1500
      spike_limit_mib: 512
      check_interval: 5s

  exporters:
    otlphttp/parseable_traces:
      endpoint: "${env:PARSEABLE_URL}"
      encoding: json
      headers:
        X-API-Key: "${env:PARSEABLE_API_KEY}"
        X-P-Stream: openlit-traces
        X-P-Log-Source: otel-traces

    otlphttp/parseable_metrics:
      endpoint: "${env:PARSEABLE_URL}"
      encoding: json
      headers:
        X-API-Key: "${env:PARSEABLE_API_KEY}"
        X-P-Stream: openlit-metrics
        X-P-Log-Source: otel-metrics

    otlphttp/parseable_logs:
      endpoint: "${env:PARSEABLE_URL}"
      encoding: json
      headers:
        X-API-Key: "${env:PARSEABLE_API_KEY}"
        X-P-Stream: openlit-logs
        X-P-Log-Source: otel-logs

  service:
    pipelines:
      traces:
        receivers: [ otlp ]
        processors: [ memory_limiter, batch ]
        exporters: [ otlphttp/parseable_traces ]
      metrics:
        receivers: [ otlp ]
        processors: [ memory_limiter, batch ]
        exporters: [ otlphttp/parseable_metrics ]
      logs:
        receivers: [ otlp ]
        processors: [ memory_limiter, batch ]
        exporters: [ otlphttp/parseable_logs ]
  ```

  Set these environment variables before starting the Collector:

  ```shell theme={"theme":{"light":"github-light","dark":"github-dark"}}
  export PARSEABLE_URL="https://YOUR_PARSEABLE_HOST"
  export PARSEABLE_API_KEY="YOUR_PARSEABLE_API_KEY"
  ```

  Replace:

  1. `YOUR_PARSEABLE_HOST` with your Parseable host. Do not append `/v1/traces`, `/v1/metrics`, or `/v1/logs`.
  2. `YOUR_PARSEABLE_API_KEY` with a Parseable API key that has ingest access.

  If your Parseable deployment uses Basic Auth, replace `X-API-Key` with `Authorization: "Basic YOUR_BASE64_CREDENTIALS"` in each exporter.
</Accordion>

### 2. Instrument your application

<Tabs>
  <Tab title="SDK">
    <Tabs>
      <Tab title="Function Arguments">
        ```python theme={"theme":{"light":"github-light","dark":"github-dark"}}
        import openlit

        openlit.init(
          otlp_endpoint="http://YOUR_OTELCOL_HOST:4318"
        )
        ```

        Replace `http://YOUR_OTELCOL_HOST:4318` with the HTTP endpoint, including the scheme, of your OpenTelemetry Collector.

        * Local Collector: `http://127.0.0.1:4318`
        * Kubernetes: `http://otel-collector.monitoring.svc.cluster.local:4318`
      </Tab>

      <Tab title="Environment Variables">
        ```python theme={"theme":{"light":"github-light","dark":"github-dark"}}
        import openlit

        openlit.init()
        ```

        Set the Collector endpoint, including the scheme:

        ```shell theme={"theme":{"light":"github-light","dark":"github-dark"}}
        export OTEL_EXPORTER_OTLP_ENDPOINT="http://YOUR_OTELCOL_HOST:4318"
        ```
      </Tab>
    </Tabs>
  </Tab>

  <Tab title="CLI">
    <Tabs>
      <Tab title="CLI Arguments">
        ```shell theme={"theme":{"light":"github-light","dark":"github-dark"}}
        openlit-instrument \
          --otlp-endpoint "http://YOUR_OTELCOL_HOST:4318" \
          --service-name "my-ai-service" \
          --deployment-environment "production" \
          python app.py
        ```
      </Tab>

      <Tab title="Environment Variables">
        ```shell theme={"theme":{"light":"github-light","dark":"github-dark"}}
        export OTEL_EXPORTER_OTLP_ENDPOINT="http://YOUR_OTELCOL_HOST:4318"
        export OTEL_SERVICE_NAME="my-ai-service"
        export OTEL_DEPLOYMENT_ENVIRONMENT="production"

        openlit-instrument python app.py
        ```
      </Tab>
    </Tabs>

    See the OpenLIT [Python SDK repository](https://github.com/openlit/openlit/tree/main/sdk/python) for more configuration options.
  </Tab>
</Tabs>

### 3. Explore your telemetry

Run your application and confirm that Parseable receives records in these datasets:

* `openlit-traces`
* `openlit-metrics`
* `openlit-logs`

Filter by `service.name` to isolate your application. If a dataset is empty, check the Collector logs, Parseable URL, and API key permissions.

### Related links

* [OpenLIT configuration](/latest/sdk/configuration)
* [Parseable OpenTelemetry documentation](https://www.parseable.com/docs/ingest-data/otel)
* [Parseable API keys](https://www.parseable.com/docs/user-guide/api-keys)
