mirror of
https://github.com/moby/moby.git
synced 2026-01-11 02:31:44 +00:00
Jaeger does not make it easy to dump all the collected trace spans from all services at once. Switch to using the OpenTelemetry Collector with the OTLP File exporter which writes the traces straight to disk in a format that Jaeger UI can natively consume. Signed-off-by: Cory Snider <csnider@mirantis.com>
24 lines
1.0 KiB
YAML
24 lines
1.0 KiB
YAML
name: 'Setup Tracing'
|
|
description: 'Composite action to set up the tracing for test jobs'
|
|
|
|
runs:
|
|
using: composite
|
|
steps:
|
|
- run: |
|
|
set -e
|
|
# The OTEL Collector is set up on Windows through an inline run step. If
|
|
# you update the collector here, don't forget to update the version set
|
|
# in .github/workflows/.windows.yml.
|
|
mkdir -p /tmp/reports
|
|
chmod 777 /tmp/reports
|
|
docker run -d --net=host --name otelcol \
|
|
-v "$(pwd)/otelcol-ci-config.yml:/etc/otelcol-contrib/config.yaml" \
|
|
-v "/tmp/reports:/data" \
|
|
otel/opentelemetry-collector-contrib:0.140.0 \
|
|
--config file:/etc/otelcol-contrib/config.yaml \
|
|
--config "yaml:exporters::file::path: /data/otel-trace.jsonl"
|
|
docker0_ip="$(ip -f inet addr show docker0 | grep -Po 'inet \K[\d.]+')"
|
|
echo "OTEL_EXPORTER_OTLP_ENDPOINT=http://${docker0_ip}:4318" >> "${GITHUB_ENV}"
|
|
echo "OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf" >> "${GITHUB_ENV}"
|
|
shell: bash
|