Skip to content

OpenTelemetry

Export Tilebox workflow logs and traces to any OTLP-compatible backend in addition to Tilebox Console.

Tilebox uses OpenTelemetry data models for workflow telemetry. Built-in Tilebox observability works without any OpenTelemetry setup, but you can add OTLP export when you need the same logs and traces in another backend.

Configure OTLP export

Call the configuration functions when the runner process starts, before executing tasks.

If the endpoint does not include /v1/traces or /v1/logs, the Python SDK adds the correct path automatically.

Environment variables

You can omit endpoint and interval arguments by setting environment variables:

Variable Used by
OTEL_TRACES_ENDPOINT configure_otel_tracing()
OTEL_LOGS_ENDPOINT configure_otel_logging()
OTEL_EXPORT_INTERVAL tracing and logging exporters

OTEL_EXPORT_INTERVAL accepts durations such as 5s, 30s, or 2m.

Using OTLP export with release runners

When a release runner starts a workflow, it imports the runner module configured in tilebox.workflow.toml with the cluster’s environment variables and secrets loaded into os.environ.

Configure OTLP export at module level in your workflow’s runner.py and guard it behind the endpoint environment variables so tilebox workflow build-release succeeds locally when those variables are unset:

my_workflow/runner.py python
import os

from tilebox.workflows import Runner
from tilebox.workflows.observability.logging import configure_otel_logging
from tilebox.workflows.observability.tracing import configure_otel_tracing

from my_workflow.tasks import ProcessScene

headers = (
    {"Authorization": f"Bearer {token}"}
    if (token := os.environ.get("OTEL_AUTH_TOKEN"))
    else None
)
if os.environ.get("OTEL_TRACES_ENDPOINT"):
    configure_otel_tracing(service="sentinel-2-runner", headers=headers)
if os.environ.get("OTEL_LOGS_ENDPOINT"):
    configure_otel_logging(service="sentinel-2-runner", headers=headers)

runner = Runner(tasks=[ProcessScene])

Set OTEL_TRACES_ENDPOINT, OTEL_LOGS_ENDPOINT, and any auth secret on the target cluster in Workflows → Environment. Built-in Tilebox export remains active alongside OTLP export.

Local collector example

For local trace testing, run Jaeger with OTLP HTTP enabled:

bash
docker run --rm --name jaeger \
  -p 16686:16686 \
  -p 4318:4318 \
  jaegertracing/jaeger:2.9.0

Then configure tracing with endpoint="http://localhost:4318" and open the Jaeger UI at http://localhost:16686.

Type to search…