28namespace neograph::observability {
47 virtual ~Span() =
default;
49 virtual void set_attribute(std::string_view key, std::string_view value) = 0;
50 virtual void set_attribute(std::string_view key, int64_t value) = 0;
51 virtual void set_attribute(std::string_view key,
double value) = 0;
65 set_attribute(key, std::string_view(value ? value :
""));
74 std::string_view payload = {}) = 0;
76 virtual void set_status_ok() = 0;
77 virtual void set_status_error(std::string_view message) = 0;
81 virtual void end() = 0;
124 virtual std::unique_ptr<Span>
start_span(std::string_view name,
125 Span* parent =
nullptr) = 0;
NEOGRAPH_API export/import macro for shared-library builds.
Opaque per-request span; lifetime is unique_ptr.
virtual void set_attribute_bool(std::string_view key, bool value)=0
Renamed off the set_attribute overload set on purpose: a const char* literal passed as the value woul...
virtual void end()=0
Close the span.
virtual void add_event(std::string_view name, std::string_view payload={})=0
Record a discrete time-stamped event on this span (mapped to OTel's Span::AddEvent).
void set_attribute(std::string_view key, const char *value)
Forwarding overload so string literals ("CHAIN") reach the string_view sink rather than slipping into...
Adapter facade for a tracing backend.
virtual std::unique_ptr< Span > start_span(std::string_view name, Span *parent=nullptr)=0