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

# OpenTelemetry Source

## Description

You can send your logs, metrics and traces to a Mezmo Pipeline via any OTLP compliant sender.

<info>
  Mezmo currently requires that you use the HTTP transport for your payload, not the standard gRPC transport mechanism, to send in data via OTLP
</info>

<Note>
  A pipeline can include only one OpenTelemetry Source because it reads a shared account-wide data stream. You can still add an OpenTelemetry Source to other pipelines. Mezmo enforces this whether you add the source through the Mezmo Web App, the Pipeline API, Terraform, cloning a pipeline, or importing a pipeline manifest. If you try to add a second OpenTelemetry Source to the same pipeline, Mezmo rejects the request with an HTTP 409 error and the code `ERR_SHARED_SOURCE_DUPLICATE`. See [Set Up Pipeline Sources](/telemetry-pipelines/set-up-pipeline-sources) and the [Error Code Reference](/telemetry-pipelines/error-code-reference) for details.
</Note>

## Configuration

There is no specific configuration values needed when adding this source to your pipeline.  The OpenTelemetry source uses a shared endpoint to ingest data.  It will route data to your pipeline based on your [Ingestion key](/docs/ingestion-key#ingestion-keys) (`apikey`).

You can obtain this key under Setting | API Keys In App.

### What you will need when configuring your OTEL collector

| Option         | Description                                                            |
| -------------- | ---------------------------------------------------------------------- |
| url / endpoint | [https://logs.mezmo.com/otel](https://logs.mezmo.com/otel)             |
| apiKey         | aka: Ingestion Key.  Token used for authorization for your OTLP source |

### OpenTelemetry Collector Configuration

To configure an OTel collector to export to Mezmo, you can add the following to your exporters section of your OTel Collector config file:

```yaml theme={null}
exporters:
  otlphttp/mezmo:
    endpoint: "https://logs.mezmo.com/otel"
    compression: gzip
    headers:
      apikey: "<YOUR_INGESTION_KEY>"
      
...

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

<info>
  The endpoint accepts gzip-compressed OTLP payloads in both protobuf and JSON format. You can reduce network bandwidth by setting `compression: gzip` on your `otlphttp` exporter, as shown above. The endpoint also accepts uncompressed payloads.
</info>

<warning>
  The endpoint in the exporters configuration must exactly match the URL above. You don't need to specify the `/v1/[type]` path, this is done automatically by the collector
</warning>

For more details, visit [OpenTelemetry Collector](telemetry-pipelines/otel-collector)
