# OpenTelemetry Collector Configuration

ThousandEyes for OpenTelemetry uses the [OpenTelemetry Collector](https://opentelemetry.io/docs/collector) to export the ThousandEyes telemetry data.

This section describes the configuration used to export data. The configuration depends on the stream's `type` and `endpointType`.

* For streams with `type` set to `opentelemetry` and `endpointType` set to `grpc`, ThousandEyes uses an [OTLP gRPC Exporter](https://github.com/open-telemetry/opentelemetry-collector/blob/main/exporter/otlpexporter/README.md) with the following configuration:

```yaml
exporters:
  otlp:
    endpoint: <stream.streamEndpointUrl>
    headers: <stream.customHeaders>
    tls:
       insecure: false
    retry_on_failure:
       enabled: true
       initial_interval: 5s
       multiplier: 1.5
       max_interval: 30s
       max_elapsed_time: 30s
```

* For streams with `type` set to `opentelemetry` and `endpointType` set to `http`, ThousandEyes uses an [OTLP HTTP Exporter](https://github.com/open-telemetry/opentelemetry-collector/blob/main/exporter/otlphttpexporter/README.md) with the following configuration:

```yaml
exporters:
  otlphttp:
    metrics_endpoint: <stream.streamEndpointUrl>
    headers: <stream.customHeaders>
    tls:
       insecure: false
    retry_on_failure:
       enabled: true
       initial_interval: 5s
       multiplier: 1.5
       max_interval: 30s
       max_elapsed_time: 30s
```

* For streams with `type` set to `splunk-hec`, ThousandEyes uses a [Splunk HTTP Event Collector (HEC) Exporter](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/exporter/splunkhecexporter/README.md) with the following configuration:

```yaml
exporters:
  splunk_hec:
    endpoint: <stream.streamEndpointUrl>
    token: <stream.exporterConfig.splunkHec.token>
    splunk_app_name: "ThousandEyes OpenTelemetry"
    source: <stream.exporterConfig.splunkHec.source>
    sourcetype: <stream.exporterConfig.splunkHec.sourceType>
    index: <stream.exporterConfig.splunkHec.index>
    tls:
      insecure: false
    retry_on_failure:
      enabled: true
      initial_interval: 5s
      multiplier: 1.5
      max_interval: 30s
      max_elapsed_time: 30s
```

### Placeholders

* `<stream.streamEndpointUrl>` is replaced with the actual endpoint URL configured in the `stream`.
* `<stream.customHeaders>` is replaced with the actual custom headers configured in the `stream`.
* `<stream.exporterConfig.splunkHec>` is replaced with the actual splunkHec exporter config configured in the `stream`.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.thousandeyes.com/product-documentation/integration-guides/opentelemetry/otel-collector-config.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
