OpenTelemetry (OTLP)
The Conversion Service supports OpenTelemetry, an open standard for exporting traces, logs, and metrics to observability backends such as Grafana, Datadog, Jaeger, or Seq.
Configuration
To enable OpenTelemetry, set environment variables on the host machine (Windows) or in the container configuration (Docker).
Environment variables
| Variable | Description | Example |
|---|---|---|
OTEL_EXPORTER_OTLP_ENDPOINT | OpenTelemetry Protocol (OTLP) collector endpoint (required) | http://localhost:4317 |
OTEL_EXPORTER_OTLP_PROTOCOL | Export protocol: grpc (default) or http/protobuf | grpc |
OTEL_SERVICE_NAME | Service name shown in traces and logs | Conversion Service |
OTEL_RESOURCE_ATTRIBUTES | Additional resource attributes | service.instance.id=node-1 |
When you set OTEL_EXPORTER_OTLP_ENDPOINT, the service exports telemetry data using the specified protocol (gRPC by default).
For the complete list of environment variables, see the OpenTelemetry SDK Environment Variables.
Examples
- Windows
- Docker
Set system environment variables or configure them in the service settings:
$env:OTEL_EXPORTER_OTLP_ENDPOINT = "http://localhost:4317"
$env:OTEL_SERVICE_NAME = "Conversion Service"
docker run -d \
-p 13033:13033 \
-e OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4317 \
-e OTEL_SERVICE_NAME="Conversion Service" \
pdftoolsag/conversion-service:6
Cluster deployments
When you deploy Conversion Service across a cluster with more than one instance, use OTEL_SERVICE_NAME or OTEL_RESOURCE_ATTRIBUTES to identify each instance:
# Option 1: Unique service name per instance
-e OTEL_SERVICE_NAME="Conversion Service (Node 1)"
# Option 2: Use resource attributes
-e OTEL_SERVICE_NAME="Conversion Service"
-e OTEL_RESOURCE_ATTRIBUTES="service.instance.id=node-1,deployment.environment=production"
Telemetry data
When enabled, the service exports:
| Type | Description |
|---|---|
| Traces | Request flow through the service with timing for each operation |
| Logs | Service logs with trace correlation (trace_id, span_id) |
| Metrics | Runtime metrics: requests, duration, errors |
The service correlates traces and logs by trace ID, so you can navigate from a trace to its related log entries in supported backends.
Verify your configuration
To confirm OpenTelemetry is working:
- Start the Conversion Service with the environment variables configured.
- Send a conversion request using the API, a connector, or the Conversion Service Client.
- Check your observability backend for incoming data:
- Traces: Look for spans with the service name you configured.
- Logs: Verify log entries include
trace_idandspan_idfields.
- In the service logs, confirm there are no connection errors to the OTLP endpoint.
If telemetry data doesn’t appear, verify that:
- The
OTEL_EXPORTER_OTLP_ENDPOINTURL is reachable from the service. - The configured protocol (
grpcorhttp/protobuf) matches your collector configuration. - Your firewall allows outbound connections to the collector port (default: 4317 for gRPC, 4318 for HTTP).
Learn more
For more information about OpenTelemetry, refer to the following external resources: