This repository has been archived by the owner on Oct 3, 2023. It is now read-only.
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.
Open
Description
the SpanContext contains the ids that uniquely identify a Span (trace_id, span_id) and the propagated trace options.
Every Span class should have it's own SpanContext:
class Span {
SpanContext getContext() {
return my_own_context;
}
}
We should also remove the context()
from the Tracer because that was the incoming SpanContext but when we make a call to a different user we should not use that context
we actually should use the SpanContext of the current Span.
======================= // Client in JS
Sent.RequestSpanA // SpanA
=======================
| here we should have the SpanContext of the "SpanA" that way "SpanB" is a child of "SpanA"
======================= // Service in PHP
Recv.RequestSpanB // SpanB
=======================
Sent.RequestSpanC // SpanC
=======================
| here we should have the SpanContext of the "SpanC" that way "SpanD" is a child of "SpanC"
======================= // DB in Java
Recv.RequestSpanA // SpanD
=======================
If I would have to write an instrumentation using the current API in PHP when I make the call to the DB I would probably propagate the RequestTracer.context(); which actually is the SpanContext of the "SpanA".