open-telemetry / opentelemetry-erlang-api

Erlang/Elixir OpenTelemetry API
Apache License 2.0
60 stars 13 forks source link

Add accessors to deconstruct Span #54

Closed leostera closed 4 years ago

leostera commented 4 years ago

When trying to link traces across separate systems (either linked via HTTP calls or a message queue), having direct access to the TraceID and the SpanID make it easier to serialize this properly and recreate a Link on the receiving end.

This PR adds support for deconstructing a Span Context to get access to these values.

I've added a couple of tests but they aren't all passing, so could use a hand getting the test for establishing links to parent trace in shape.