> For the complete documentation index, see [llms.txt](https://docs.nected.ai/nected-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nected.ai/nected-docs/self-hosting/additional-configuration/additional-integrations/opentelemetry-otel.md).

# OpenTelemetry (OTel)

Nected services can export metrics and traces to an OpenTelemetry (OTel) Collector, letting you plug Nected into your existing observability stack instead of relying solely on built-in monitoring.

### Prerequisites

* A running OpenTelemetry Collector reachable from your Nected cluster, with its endpoint and protocol (`http` or `grpc`) noted.
* Access to the `nected-values.yaml` file used for your Helm deployment.
* Helm access to redeploy the Nected release.

### Configuration

1. Open the `nected-values.yaml` file used for your Nected deployment.
2. Under each service you want to instrument, add the `OTEL_*` environment variables shown below.
3. Replace the placeholder values with your OpenTelemetry Collector's configuration.
4. Redeploy Nected for the changes to take effect (see Applying the configuration).

You can enable OTel for one, several, or all of the services below- each is configured independently.

#### Nalanda

```yaml
nalanda:
  envVars:
    OTEL_ENABLED: "true"
    OTEL_EXPORTER_OTLP_PROTOCOL: "<<http or grpc>>"
    OTEL_EXPORTER_OTLP_ENDPOINT_TRACE: "http://<<otel-collector-host>>:<<port>>"
    OTEL_EXPORTER_OTLP_ENDPOINT_METRIC: "http://<<otel-collector-host>>:<<port>>"
    OTEL_EXPORTER_OTLP_HEADERS:
    OTEL_TRACES_SAMPLER_RATIO: "1.0"
```

#### Vidhaan Executer

```yaml
vidhaan-executer:
  envVars:
    OTEL_ENABLED: "true"
    OTEL_EXPORTER_OTLP_PROTOCOL: "<<http or grpc>>"
    OTEL_EXPORTER_OTLP_ENDPOINT_TRACE: "http://<<otel-collector-host>>:<<port>>"
    OTEL_EXPORTER_OTLP_ENDPOINT_METRIC: "http://<<otel-collector-host>>:<<port>>"
    OTEL_EXPORTER_OTLP_HEADERS:
    OTEL_TRACES_SAMPLER_RATIO: "1.0"
    ENABLE_PROMETHEUS: "false" # Optional: disable Prometheus if OTel is handling metrics and traces
```

#### Medha

```yaml
medha:
  envVars:
    OTEL_ENABLED: "true"
    OTEL_EXPORTER_OTLP_PROTOCOL: "<<http or grpc>>"
    OTEL_EXPORTER_OTLP_ENDPOINT_TRACE: "http://<<otel-collector-host>>:<<port>>"
    OTEL_EXPORTER_OTLP_ENDPOINT_METRIC: "http://<<otel-collector-host>>:<<port>>"
    OTEL_EXPORTER_OTLP_HEADERS:
    OTEL_TRACES_SAMPLER_RATIO: "1.0"
```

#### Garuda *(optional)*

```yaml
garuda:
  envVars:
    OTEL_ENABLED: "true"
    OTEL_EXPORTER_OTLP_PROTOCOL: "<<http or grpc>>"
    OTEL_EXPORTER_OTLP_ENDPOINT_TRACE: "http://<<otel-collector-host>>:<<port>>"
    OTEL_EXPORTER_OTLP_ENDPOINT_METRIC: "http://<<otel-collector-host>>:<<port>>"
    OTEL_EXPORTER_OTLP_HEADERS:
    OTEL_TRACES_SAMPLER_RATIO: "1.0"
```

### Configuration parameters

<table data-search="false"><thead><tr><th>Parameter</th><th>Description</th></tr></thead><tbody><tr><td><code>OTEL_ENABLED</code></td><td>Enables OpenTelemetry integration for the service. Set to <code>"true"</code>.</td></tr><tr><td><code>OTEL_EXPORTER_OTLP_PROTOCOL</code></td><td>Protocol used to communicate with the OTel Collector. Supported values: <code>http</code>, <code>grpc</code>.</td></tr><tr><td><code>OTEL_EXPORTER_OTLP_ENDPOINT_TRACE</code></td><td>Endpoint of the OpenTelemetry Collector for traces, e.g. <code>http://otel-collector.observability.svc:4318</code>.</td></tr><tr><td><code>OTEL_EXPORTER_OTLP_ENDPOINT_METRIC</code></td><td>Endpoint of the OpenTelemetry Collector for metrics, e.g. <code>http://otel-collector.observability.svc:4318</code>.</td></tr><tr><td><code>OTEL_EXPORTER_OTLP_HEADERS</code></td><td>Optional headers sent with every request to the OTel Collector (e.g. for auth).</td></tr><tr><td><code>OTEL_TRACES_SAMPLER_RATIO</code></td><td>Fraction of traces to sample, from <code>0.0</code> to <code>1.0</code>. <code>"1.0"</code> samples all traces.</td></tr><tr><td><code>ENABLE_PROMETHEUS</code></td><td><em>(vidhaan-executer only)</em> Controls Prometheus metrics collection. Set to <code>"false"</code> if OTel is already handling metrics and traces, to avoid collecting them twice.</td></tr></tbody></table>

### Applying the configuration

After updating  `nected-values.yaml`, redeploy Nected with Helm:

```bash
helm upgrade -i nected nected/nected -f nected-values.yaml
```

Once the rollout completes, the configured services will start sending metrics and traces to your OpenTelemetry Collector.

### Supported tools

Since Nected exports telemetry in the standard OTLP format, you can connect it to any OTLP-compatible observability tool via your OpenTelemetry Collector, including:

* **Grafana:** open-source visualization platform, typically paired with Tempo (traces) and Mimir/Prometheus (metrics) for dashboards and alerting.
* **Dynatrace:** full-stack observability platform with AI-assisted root-cause analysis across traces, metrics, and logs.
* **New Relic:** cloud-based observability platform offering unified dashboards, alerting, and APM built on top of OTLP data.
* **Splunk:** log and telemetry analytics platform, useful when you want traces and metrics correlated with existing log data in Splunk.
* **Datadog:** monitoring and security platform with APM, infrastructure monitoring, and dashboards driven by OTLP ingestion.

The setup steps are the same regardless of which tool you use: point your OpenTelemetry Collector's exporter configuration at that tool's OTLP endpoint (each vendor documents this for their own product), and Nected's services will keep sending data to the Collector as configured above — no changes needed on the Nected side when you switch or add a backend.

### Troubleshooting

* **No data arriving at the Collector:** confirm `OTEL_EXPORTER_OTLP_ENDPOINT_TRACE` and `OTEL_EXPORTER_OTLP_ENDPOINT_METRIC` are reachable from within the cluster (network policies and DNS are the usual culprits) and that the protocol matches what your Collector listens for.
* **Traces missing intermittently:** check `OTEL_TRACES_SAMPLER_RATIO`; a value below `1.0` intentionally drops a portion of traces.
* **Duplicate metrics from vidhaan-executer:** set `ENABLE_PROMETHEUS: "false"` if you've enabled OTel metrics for this service.
