Skip to main content

Crate semiont_telemetry

Crate semiont_telemetry 

Source
Expand description

The telemetry a Semiont transport and a Semiont service share, reported to whatever OpenTelemetry the process installed: nothing here exports, and with nothing installed no span is recorded and no trace context travels.

A transport reports through one function per row of the SDK telemetry table (protocol/specs/src/sdk-telemetry/telemetry.json): bus_emit, which is also the semiont.bus.sent count, bus_recv, content_put, content_get, content_get_graph, content_get_annotations and content_get_anchored_text. It names no span, kind or attribute of its own, and puts active_trace on what it sends.

A service’s own spans are the service telemetry table’s, which it states itself over in_span and in_span_now, continuing a caller’s trace with continued and a frame’s with continuing.

The tracer, the meter and the propagator are taken from opentelemetry::global at each use, so telemetry installed after a client opened is reported to all the same.

Functions§

active_trace
The active span’s W3C trace context, when a span is active: what a transport puts on what it sends.
active_trace_id
The active span’s trace id, when a span is active: what the bus log’s trace= field reads (semiont::bus_log::set_trace_id_provider).
bus_emit
bus.emit:{channel} and semiont.bus.sent: an emit a client sent, counted and run in a span of the trace that sent it.
bus_recv
bus.recv:{channel}: a frame’s arrival, in the trace it was sent under. Answers the trace that what is done for the frame continues: the span’s own, or, when nothing records one, the one the frame came with.
content_get
content.get: a read of a resource’s bytes, whole or as a stream.
content_get_anchored_text
content.get_anchored_text: a read of a resource’s anchored text.
content_get_annotations
content.get_annotations: a read of a resource’s annotations.
content_get_graph
content.get_graph: a read of a resource’s description.
content_put
content.put: an upload.
continued
The W3C trace context a caller sent (traceparent, tracestate), as the parent of what is done for it; the current context when it sent none, or when the process installed no propagator.
continuing
Run work in the trace a frame arrived in: what is done for it, and what is sent in answer, belongs to the sender’s trace.
in_span
Run work in a span, a child of parent.
in_span_now
The same, for work that does not wait.
on_the_bus
What a span or a count of the bus carries: the channel, and the scope when there is one.