CICD-357 · Distributed tracing smoke tests
Encyclopedia · Observability and SRE pipelines · All snippets
Previous · CICD-356 · Next · CICD-358
1. Where it fits
- Placement CI run step or authorized lab terminal.
- Prerequisites staging metrics stack, provisioned endpoints and read-only CI identity except explicitly approved writes.
- Platforms local-linux, github-actions, gitea-actions.
- Parameters
TRACE_API,TRACE_ID.
2. Copy the snippet
bash
curl -fsS --max-time 10 "${TRACE_API:?}/api/traces/${TRACE_ID:?}" | jq -e '.data[0].spans | length >= 2'3. How it works
The request checks the selected HTTP interface. Timeouts limit waiting, and an explicit exit or payload condition determines pass and fail. The expression filters or transforms the input JSON. Where jq -e is used, a false or empty result can fail the gate.
4. Verify the result
Use Jaeger-compatible trace lookup after injecting known trace context in a smoke request. Poll to allow export latency.
Validation syntax-validated (Bash parse). Status definitions.