8#ifndef A11_OBS_PROVIDER_H_
9#define A11_OBS_PROVIDER_H_
15#include <absl/status/status.h>
70 std::vector<std::pair<std::string, std::string>>
83 std::vector<std::pair<std::string, std::string>>
Definition provider.cc:47
ExporterKind
Destination used for spans produced by actions, sessions, and transports.
Definition provider.h:22
@ 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:293
std::vector< RecordedSpan > GetRecordedSpans()
Return in-memory spans oldest first; meaningful for kInMemory only.
Definition provider.cc:298
void Shutdown()
Flush pending spans and restore the process to its unconfigured state.
Definition provider.cc:285
absl::Status Configure(const ProviderOptions &options)
Install or replace the process-wide tracer provider.
Definition provider.cc:205
SpanKind
OpenTelemetry span relationships, mirrored to keep OTel out of this API.
Definition span.h:21
void ClearRecordedSpans()
Clear spans retained by the in-memory exporter.
Definition provider.cc:305
Future< T > SubmitWithCancellationHook(absl::AnyInvocable< absl::StatusOr< T >() && > work, std::function< void()> cancellation_hook, thread::TreeOptions tree_options)
Run work on A11's fiber pool with application-specific cancellation.
Definition executor.h:30
Configure how an A11 process records and exports agent traces.
Definition provider.h:31
std::string otlp_endpoint
Full OTLP/HTTP traces URL.
Definition provider.h:42
std::vector< std::pair< std::string, std::string > > otlp_headers
Request headers such as backend authentication.
Definition provider.h:44
std::string service_name
OTel service.name resource value.
Definition provider.h:32
bool use_simple_processor
Export synchronously as spans end.
Definition provider.h:39
int otlp_timeout_millis
Export request timeout.
Definition provider.h:45
std::vector< std::pair< std::string, std::string > > resource_attributes
Additional attributes attached to the process-level OTel resource.
Definition provider.h:34
ExporterKind exporter
Span destination; must not remain kNone when passed to Configure().
Definition provider.h:36
std::vector< std::string > baggage_span_attributes
Baggage keys promoted to same-named span attributes.
Definition provider.h:52
Event captured on a span by the in-memory exporter.
Definition provider.h:68
std::vector< std::pair< std::string, std::string > > attributes
Snapshot attributes.
Definition provider.h:71
std::string name
Event name.
Definition provider.h:69
Finished span snapshot returned by the in-memory exporter.
Definition provider.h:75
int status_code
OTel status: 0 unset, 1 OK, 2 error.
Definition provider.h:81
std::string span_id
16 lowercase hex characters.
Definition provider.h:78
std::vector< std::pair< std::string, std::string > > attributes
Final attributes.
Definition provider.h:84
std::string parent_span_id
Parent id, or empty for a root span.
Definition provider.h:79
SpanKind kind
OTel relationship kind.
Definition provider.h:80
std::string status_description
Optional error explanation.
Definition provider.h:82
std::string trace_id
32 lowercase hex characters.
Definition provider.h:77
std::vector< RecordedEvent > events
Events in recording order.
Definition provider.h:85
std::string name
Final span name.
Definition provider.h:76