22#ifndef A11_OBS_PROVIDER_H_
23#define A11_OBS_PROVIDER_H_
29#include <absl/status/status.h>
81 std::vector<std::pair<std::string, std::string>>
94 std::vector<std::pair<std::string, std::string>>
Definition provider.cc:58
ExporterKind
Destination used for spans produced by actions, sessions, and transports.
Definition provider.h:36
@ kNone
Unconfigured sentinel; Configure() rejects this value.
@ kOtlpHttp
Native OTLP/HTTP export; requires the A11_WITH_OTLP_HTTP build option.
@ kInMemory
Retain finished spans for GetRecordedSpans(); useful in tests.
@ kOstream
Human-readable output for local debugging.
bool IsConfigured()
Whether a tracer provider is currently installed.
Definition provider.cc:302
std::vector< RecordedSpan > GetRecordedSpans()
Return in-memory spans oldest first; meaningful for kInMemory only.
Definition provider.cc:307
void Shutdown()
Flush pending spans and restore the process to its unconfigured state.
Definition provider.cc:294
absl::Status Configure(const ProviderOptions &options)
Install or replace the process-wide tracer provider.
Definition provider.cc:214
SpanKind
OpenTelemetry span relationships, mirrored to keep OTel out of this API.
Definition span.h:35
void ClearRecordedSpans()
Clear spans retained by the in-memory exporter.
Definition provider.cc:314
Configure how an A11 process records and exports agent traces.
Definition provider.h:45
std::string otlp_endpoint
Full OTLP/HTTP traces URL.
Definition provider.h:56
std::vector< std::pair< std::string, std::string > > otlp_headers
Request headers such as backend authentication.
Definition provider.h:58
std::string service_name
OTel service.name resource value.
Definition provider.h:46
bool use_simple_processor
Export synchronously as spans end.
Definition provider.h:53
int otlp_timeout_millis
Export request timeout.
Definition provider.h:59
std::vector< std::pair< std::string, std::string > > resource_attributes
Additional attributes attached to the process-level OTel resource.
Definition provider.h:48
ExporterKind exporter
Span destination; must not remain kNone when passed to Configure().
Definition provider.h:50
std::vector< std::string > baggage_span_attributes
Baggage keys promoted to same-named span attributes.
Definition provider.h:63
Event captured on a span by the in-memory exporter.
Definition provider.h:79
std::vector< std::pair< std::string, std::string > > attributes
Snapshot attributes.
Definition provider.h:82
std::string name
Event name.
Definition provider.h:80
Finished span snapshot returned by the in-memory exporter.
Definition provider.h:86
int status_code
OTel status: 0 unset, 1 OK, 2 error.
Definition provider.h:92
std::string span_id
16 lowercase hex characters.
Definition provider.h:89
std::vector< std::pair< std::string, std::string > > attributes
Final attributes.
Definition provider.h:95
std::string parent_span_id
Parent id, or empty for a root span.
Definition provider.h:90
SpanKind kind
OTel relationship kind.
Definition provider.h:91
std::string status_description
Optional error explanation.
Definition provider.h:93
std::string trace_id
32 lowercase hex characters.
Definition provider.h:88
std::vector< RecordedEvent > events
Events in recording order.
Definition provider.h:96
std::string name
Final span name.
Definition provider.h:87