-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Networking & Observability
-
2
In order to support trace context propagation we want to have a generic Traceable interface for objects that might contain a trace context :
// Traceable MUST only be used by a single thread. If a new thread is spawned in a sub-operation this thread MUST have its own Traceable copy. class Traceable { public: struct SpanContext {} Traceable(const Traceable& t) : _context(deep_copy(t._context)) {} // MUST be used by a single thread only. void setActiveContext(std::shared_ptr<BaseContext> context) { _context = std::move(context); } // MUST be used by a single thread only. std::shared_ptr<BaseContext> getActiveContext() const { return _context; } private: std::shared_ptr<SpanContext> _context; };
We also want to make OperationContext inherit from it to have easily trace most of the server codebase.
- is depended on by
-
SERVER-100118 Introduce OTEL subclass for SpanContext
-
- Blocked
-