arena-py API v0.11.1
arena .utils .arena_telemetry
The ArenaTelemetry generates traces, metrics, and logs using OpenTelemetry (OTEL). It can export using OTEL's protocol (OTLP), send JSON OTEL spans to MQTT, or to the console.
The :envvar:ARENA_TELEMETRY
environment variable enables the telemetry.
The :envvar:OTLP_ENDPOINT
environment variable defines the OTLP endpoint when OTLP is used.
Implementation of SpanExporter
that sends spans to MQTT
Exports a batch of telemetry data.
Args:
spans: The list of opentelemetry.trace.Span
objects to be exported
Returns: The result of the export
Implementation of ARENA telemetry.
According to :envvar:ARENA_TELEMETRY
, exports using OTLP, send JSON OTEL spans to MQTT, or to the console.
Return an ArenaTelemetry
using given service name and id
Provides utility calls that wrap open telemetry functionality to start spans, log events, and other.
Creates a parent span for all the spans related to the program.
Args: name: name of the service used with the telemetry backend id: additional id used with the telemetry backend
Wrapper to otel start_as_current_span; force context to be parent span
Wrapper to otel start_as_current_span to start a process message span; force context to be parent span