Offline Telemetry ExampleΒΆ
This example demonstrates exporting OpenTelemetry traces to a JSON file for post-mortem analysis in Grafana.
Activate tracing by setting environment variables as described in the telemetry configuration.
Generate traces:
Navigate to the json-exporter folder in the offline telemetry example JSON exporter.
Start dataClay and OpenTelemetry Collector services:
docker compose up
Run the dataClay client:
python3 client.py
Traces are exported to the traces folder. You can visualize the JSON traces in Grafana.
Visualize in Grafana:
Navigate to the json-post-mortem folder in the offline telemetry example post-mortem.
Start the OpenTelemetry Collector, Tempo, and Grafana services:
docker compose up
Open Grafana at <http://localhost:3000> (default username/password: admin/admin).
In the Explore section, select Tempo as the data source and use the Trace ID field to query traces.
Alternative Trace Export:
Run the OpenTelemetry Collector manually:
docker run \ -v ./config/otel-collector.yaml:/etc/otel-collector.yaml \ otel/opentelemetry-collector-contrib \ "--config=/etc/otel-collector.yaml"
Copy Traces from MareNostrum 5:
To analyze traces from MareNostrum 5, copy them locally:
scp transfer1.bsc.es:~/.dataclay/otel-traces.json ./traces/otel-traces.json
Troubleshooting:
If permission issues arise for the /traces folder, adjust permissions:
sudo chmod -R 777 traces