NeoGraph 0.10.0
A C++17 Graph Agent Engine Library — LangGraph for C++
Loading...
Searching...
No Matches
tracer.h File Reference

Dep-free abstract Tracer / Span interface. More...

#include <neograph/api.h>
#include <cstdint>
#include <memory>
#include <string>
#include <string_view>
Include dependency graph for tracer.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  neograph::observability::Span
 Opaque per-request span; lifetime is unique_ptr. More...
 
class  neograph::observability::Tracer
 Adapter facade for a tracing backend. More...
 

Detailed Description

Dep-free abstract Tracer / Span interface.

NeoGraph does not link against opentelemetry-cpp directly. The openinference_tracer and OpenInferenceProvider helpers in observability/openinference.h drive this small abstract interface instead, and downstream code provides an adapter wrapping its own tracing backend (opentelemetry-cpp, a custom recorder, an in-memory test fake, etc.).

The interface intentionally stops short of OTel's full surface (links, resources, span context propagation, sampler hooks). It covers the minimum the OpenInference attribute-mapping layer needs: named span open/close, attribute writes, status, and discrete events for streaming-token diagnostics. Anything richer is the adapter author's responsibility.

Definition in file tracer.h.