> For the complete documentation index, see [llms.txt](https://help.form.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.form.io/deploy/opentelemetry-support.md).

# OpenTelemetry Support

Using OpenTelemetry to collect performance signals

## Overview <a href="#overview" id="overview"></a>

The Form.io Enterprise Platform supports [OpenTelemetry](https://opentelemetry.io/) to collect signals ([traces](https://opentelemetry.io/docs/concepts/signals/traces/), [metrics](https://opentelemetry.io/docs/concepts/signals/metrics/), and [logs](https://opentelemetry.io/docs/concepts/signals/logs/)). It functions on both the Enterprise Server and the PDF Server.

OpenTelemetry is disabled by default and will not collect any information until the environment has been configured and the endpoint has been established.

Once enabled, the server exports signals over OTLP to any standard OpenTelemetry Collector or compatible endpoint.

### Logs, Traces, and Metrics

Unless separately enabled, telemetry will not collect server logs.\
Logging includes the entire application log stream in addition to the telemetry-related information.

### Enabling telemetry <a href="#enabling-telemetry" id="enabling-telemetry"></a>

Setting any of the endpoint variables below turns telemetry on.&#x20;

{% hint style="info" %}
These must be separately defined on both the Enterprise Server and PDF Server.
{% endhint %}

| Variable                              | Effect                                                                                                                                                                                                                                                                                                               |
| ------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `OTEL_EXPORTER_OTLP_ENDPOINT`         | Sets the OTLP collector base URL and enables telemtry. By default it will only collect traces and metrics. Logs are enabled separately.                                                                                                                                                                              |
| `OTEL_EXPORTER_OTLP_TRACES_ENDPOINT`  | Enables telemetry as a traces-only collector. Metrics and logs stay off unless separately enabled.                                                                                                                                                                                                                   |
| `OTEL_EXPORTER_OTLP_METRICS_ENDPOINT` | Enables telemetry as a metrics-only collector. Traces and logs stay off unless separately enabled.                                                                                                                                                                                                                   |
| `OTEL_EXPORTER_OTLP_LOGS_ENDPOINT`    | Defines a logs-only or split collector endpoint. `FORMIO_OTEL_LOGS_ENABLED` must also be enabled.                                                                                                                                                                                                                    |
| `FORMIO_OTEL_LOGS_ENABLED=true`       | <p><strong>Required opt-in for the logs signal.</strong></p><p>An endpoint alone never turns logs on, because the logger auto-instrumentation forwards your entire application log stream, not just telemetry-relevant lines. With the flag set, logs go to the logs endpoint or, failing that, the general one.</p> |
| `OTEL_SERVICE_NAME`                   | Overrides the default reported service name (`formio-server` or `pdf-server`).                                                                                                                                                                                                                                       |
| `OTEL_SDK_DISABLED=true`              | Kill switch — keeps telemetry off even when an endpoint is configured.                                                                                                                                                                                                                                               |

Each signal is exported only once the endpoint is defined, either individually or through the genral `OTEL_EXPORTER_OTLP_ENDPOINT.` Sgnals with no endpoint are ignored, rather than defaulting to `http://localhost:4318`.

{% hint style="warning" %}
**PDF Server Logs are not exported.**

The PDF Server produces logs through the `debug` package, which is not handled by OpenTelemetry out-of-the-box.\
Defining `FORMIO_OTEL_LOGS_ENABLED` on PDF Server will have no ef
{% endhint %}

### Additional configuration variables

All standard `OTEL_*` variables (protocol, headers, sampling, export interval, etc.) are handled by the OpenTelemetry SDK itself.\
Refer to the [OpenTelemetry SDK environment variable reference](https://opentelemetry.io/docs/languages/sdk-configuration/) for additional inforation.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.form.io/deploy/opentelemetry-support.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
