Skip to content

Latest commit

 

History

History
39 lines (29 loc) · 1.93 KB

tracing.md

File metadata and controls

39 lines (29 loc) · 1.93 KB

Tracing

Tracing across the stack follows, as much as possible, the Open Telemetry specifications. Configuration environment variables are specified in the OpenTelemetry Environment Variable Specification where possible. The Boxo Tracing documentation is the basis for tracing here.

Note

A major distinction from the more general tracing enabled in boxo is that when tracing is enabled it is restricted to flows through HTTP Gateway requests, rather than also included background processes.

Fractional Sampling

To sample a % of requests set SOMEGUY_SAMPLING_FRACTION to a value between 0 and 1.

Per Request

Per-request tracing is possible when a non-empty SOMEGUY_TRACING_AUTH is set in Someguy and when there are both valid Authorization and Traceparent HTTP headers passed in the request.

Per-request tracing example:

$ export SOMEGUY_TRACING_AUTH=CHANGEME-tracing-auth-secret # use value from Someguy config
$ export CID=bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdi
$ curl -H "Authorization: $SOMEGUY_TRACING_AUTH" -H "Traceparent: 00-$(openssl rand -hex 16)-00$(openssl rand -hex 7)-01" http://127.0.0.1:8090/routing/v1/providers/$CID -v -o /dev/null
...
> Authorization: CHANGEME-tracing-auth-secret
> Traceparent: 00-b617dc6b6e302ccbabe0115eac80320b-00033792c7de8fc6-01
...

Now you can search for trace_id = b617dc6b6e302ccbabe0115eac80320b to find the trace.