tools/observability/opentelemetry/README.md
This directory contains the code for running the OpenTelemetry collector and exporter.
The docker compose file located in this directory will start the following services:
To start the services, navigate to this directory and run the following command:
docker compose up
The opentelemetry collector exposes an OTLP gRPC endpoint on port 4317.
To execute a job with opentelemetry enabled, set the DAFT_DEV_OTEL_EXPORTER_OTLP_ENDPOINT environment variable to grpc://localhost:4317 and run the job.
Example:
DAFT_DEV_OTEL_EXPORTER_OTLP_ENDPOINT=grpc://localhost:4317 python tools/observability/opentelemetry/example.py
To view the traces on the Jaeger UI, navigate to http://localhost:16686/ and select the daft service from the dropdown menu.
To view the metrics on the Prometheus UI, navigate to http://localhost:9090/.
To query for all metrics provided by Daft, try the following PromQL query:
{service_name='daft'}