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

# OTLP http

> Configuring the OTLP http backend (Self-Hosted)

### Getting Started

<img src="https://d15jtxgb40qetw.cloudfront.net/opentelemetry.svg" alt="otlphttp" className="not-prose h-20" />

For advanced users trying to implement complex observability pipelines, Odigos support sending data to any OTLP http endpoint.

<Note>
  Note that if your backend expects [OTLP over gRPC](https://opentelemetry.io/docs/specs/otel/protocol/exporter/#configuration-options) you should use the [OTLP gRPC](../backends/otlp) destination instead.
</Note>

<Tip>
  If your backend is supported natively in Odigos, it's recommended to use the native integration.
</Tip>

#### Using Basic Authentication

This section is relevant if your OTLP http endpoint requires [basic authentication](https://en.wikipedia.org/wiki/Basic_access_authentication) (username and password).

To configure basic authentication, use the optional config options `Basic Auth Username` and `Basic Auth Password`.

### Configuring Destination Fields

<Accordion title="Supported Signals:">
  ✅ Traces
  ✅ Metrics
  ✅ Logs
  ✅ Profiles
</Accordion>

* **OTLP\_HTTP\_ENDPOINT** `string` : OTLP http Endpoint. The format is `host:port`, host is required, port is optional and defaults to the default OTLP HTTP port `4318`.
  * This field is required
  * Example: `http://host:port`
* **OTLP\_HTTP\_BASIC\_AUTH\_USERNAME** `string` : Basic Auth Username. in case the otlp receiver requires basic auth, this is the username
  * This field is optional
  * Example: `username`
* **OTLP\_HTTP\_BASIC\_AUTH\_PASSWORD** `string` : Basic Auth Password. in case the otlp receiver requires basic auth, this is the password
  * This field is optional
  * Example: `password`
* **OTLP\_HTTP\_OAUTH2\_ENABLED** `boolean` : Enable OAuth2. Enable OAuth2 client credentials authentication
  * This field is optional and defaults to `False`
* **OTLP\_HTTP\_OAUTH2\_CLIENT\_ID** `string` : OAuth2 Client ID. OAuth2 client identifier for client credentials flow
  * This field is optional
  * Example: `your-client-id`
* **OTLP\_HTTP\_OAUTH2\_CLIENT\_SECRET** `string` : OAuth2 Client Secret. OAuth2 client secret for client credentials flow
  * This field is optional
  * Example: `your-client-secret`
* **OTLP\_HTTP\_OAUTH2\_TOKEN\_URL** `string` : OAuth2 Token URL. OAuth2 token endpoint URL for obtaining access tokens
  * This field is optional
  * Example: `https://example.com/oauth2/token`
* **OTLP\_HTTP\_OAUTH2\_SCOPES** `string` : OAuth2 Scopes. Comma-separated list of OAuth2 scopes to request (e.g., "api.metrics,api.traces")
  * This field is optional
  * Example: `api.metrics,api.traces`
* **OTLP\_HTTP\_OAUTH2\_AUDIENCE** `string` : OAuth2 Audience. OAuth2 audience parameter for token requests
  * This field is optional
  * Example: `api.example.com`
* **OTLP\_HTTP\_COMPRESSION** `string` : Destination Compression Type. Compression type to use for the destination. The default is `none`. The compression type must be supported by the destination.
  * This field is optional and defaults to `none`
* **OTLP\_HTTP\_HEADERS** `{ key: string; value: string; }[]` : Headers. Headers is the option to set custom HTTP headers for OTLP HTTP destination. If specified, please provide each header in the format: key:value. Multiple headers can be added. Keys must be non-empty strings and follow standard HTTP header conventions. Values must be non-empty strings and may include alphanumerics, whitespace, and standard punctuation.
  * This field is optional
* **OTLP\_HTTP\_TRACES\_ENDPOINT** `string` : OTLP http traces Endpoint. The format is `host:port`, host is required, port is optional and defaults to the default OTLP HTTP port `4318`, if missing `http://host:port/v1/traces` will be used.
  * This field is optional
  * Example: `http://host:port/v1/traces`
* **OTLP\_HTTP\_METRICS\_ENDPOINT** `string` : OTLP http metrics Endpoint. The format is `host:port`, host is required, port is optional and defaults to the default OTLP HTTP port `4318`, if missing `http://host:port/v1/metrics` will be used.
  * This field is optional
  * Example: `http://host:port/v1/metrics`
* **OTLP\_HTTP\_LOGS\_ENDPOINT** `string` : OTLP http logs Endpoint. The format is `host:port`, host is required, port is optional and defaults to the default OTLP HTTP port `4318`, if missing `http://host:port/v1/logs` will be used.
  * This field is optional
  * Example: `http://host:port/v1/logs`
* **OTLP\_HTTP\_PROFILES\_ENDPOINT** `string` : OTLP http profiles Endpoint. The format is `host:port`, host is required, port is optional and defaults to the default OTLP HTTP port `4318`, if missing `http://host:port/v1/profiles` will be used.
  * This field is optional
  * Example: `http://host:port/v1/profiles`
* **OTLP\_HTTP\_TLS\_ENABLED** `boolean` : Enable TLS. Secure connection
  * This field is optional and defaults to `False`
* **OTLP\_HTTP\_CA\_PEM** `string` : Certificate Authority. When using TLS, provide the CA certificate in PEM format to verify the server. If empty uses system root CA
  * This field is optional
  * Example: `-----BEGIN CERTIFICATE-----`
* **OTLP\_HTTP\_INSECURE\_SKIP\_VERIFY** `boolean` : Insecure Skip Verify. Skip TLS certificate verification
  * This field is optional and defaults to `False`

### Adding Destination to Odigos

There are two primary methods for configuring destinations in Odigos:

##### **Using the UI**

<Steps>
  <Step>
    Use the [Odigos CLI](https://docs.odigos.io/cli/odigos_ui) to access the UI

    ```bash theme={null}
    odigos ui
    ```
  </Step>

  <Step>
    Click on `Add Destination`, select `OTLP http` and follow the on-screen instructions
  </Step>
</Steps>

##### **Using Kubernetes manifests**

<Steps>
  <Step>
    Save the YAML below to a file (e.g. `otlphttp.yaml`)

    ```yaml theme={null}
    apiVersion: odigos.io/v1alpha1
    kind: Destination
    metadata:
      name: otlphttp-example
      namespace: odigos-system
    spec:
      data:
        OTLP_HTTP_ENDPOINT: <OTLP http Endpoint>
        # Note: The commented fields below are optional.
        # OTLP_HTTP_BASIC_AUTH_USERNAME: <Basic Auth Username>
        # OTLP_HTTP_OAUTH2_ENABLED: <Enable OAuth2>
        # OTLP_HTTP_OAUTH2_CLIENT_ID: <OAuth2 Client ID>
        # OTLP_HTTP_OAUTH2_TOKEN_URL: <OAuth2 Token URL>
        # OTLP_HTTP_OAUTH2_SCOPES: <OAuth2 Scopes>
        # OTLP_HTTP_OAUTH2_AUDIENCE: <OAuth2 Audience>
        # OTLP_HTTP_COMPRESSION: <Destination Compression Type (default: none) (options: [none, gzip, snappy, lz4, zlib, deflate, zstd])>
        # OTLP_HTTP_HEADERS: <Headers>
        # OTLP_HTTP_TRACES_ENDPOINT: <OTLP http traces Endpoint>
        # OTLP_HTTP_METRICS_ENDPOINT: <OTLP http metrics Endpoint>
        # OTLP_HTTP_LOGS_ENDPOINT: <OTLP http logs Endpoint>
        # OTLP_HTTP_PROFILES_ENDPOINT: <OTLP http profiles Endpoint>
        # OTLP_HTTP_TLS_ENABLED: <Enable TLS>
        # OTLP_HTTP_CA_PEM: <Certificate Authority>
        # OTLP_HTTP_INSECURE_SKIP_VERIFY: <Insecure Skip Verify>
      destinationName: otlphttp
      # Uncomment the 'secretRef' below if you are using the optional Secret.
      # secretRef:
      #   name: otlphttp-secret
      signals:
      - TRACES
      - METRICS
      - LOGS
      - PROFILES
      type: otlphttp

    ---

    # The following Secret is optional. Uncomment the entire block if you need to use it.
    # apiVersion: v1
    # data:
    #   OTLP_HTTP_BASIC_AUTH_PASSWORD: <Base64 Basic Auth Password>
    #   OTLP_HTTP_OAUTH2_CLIENT_SECRET: <Base64 OAuth2 Client Secret>
    # kind: Secret
    # metadata:
    #   name: otlphttp-secret
    #   namespace: odigos-system
    # type: Opaque
    ```
  </Step>

  <Step>
    Apply the YAML using `kubectl`

    ```bash theme={null}
    kubectl apply -f otlphttp.yaml
    ```
  </Step>
</Steps>
