Read logs, metrics and traces; query service behavior and reason about alerts and missing evidence.
Scope and conventions
PromQL uses classic counter/gauge/histogram series; Loki examples use LogQL log pipelines. Metric names and log fields are an explicit example schema, not automatic SDK output. Queries need data with that schema. Native language logging and HTTP recipes remain in Programming languages.
Use the tracing SDK’s inject/extract propagator rather than assembling identifiers manually. Incoming trace context is untrusted metadata, not identity or authorization; control what is forwarded outside the trust boundary.
Fragment
Illustrative W3C traceparent header: version, trace-id, parent-id, flags. It is not a bearer credential.
Telemetry & queries · Propagate trace context across a trusted boundary
A span records one operation with timing, attributes, events and relationships. End it at the actual operation boundary and record failures through the SDK’s supported status/error APIs. Child durations need not add up to total latency.
Protocol / decision sketch
Sequence or decision sketch; not executable code.
Telemetry & queries · Make a span describe an owned operation
Follow appearance
✓GitHub Light
GitHub Dark
Rosé Pine
Catppuccin Mocha
VS Code Dark+
request span├─ database call└─ downstream call (may overlap another child)request ends when its owned operation ends
Head sampling chooses before the whole trace is known; tail sampling can decide after collecting more trace data. Sampling/export loss means absence of a trace is not proof that an operation did not happen.
Protocol / decision sketch
Sequence or decision sketch; not executable code.
Telemetry & queries · Treat sampled traces as selected evidence
Follow appearance
✓GitHub Light
GitHub Dark
Rosé Pine
Catppuccin Mocha
VS Code Dark+
all requests → sampling policy → recorded/exported subsetinspect: policy + collector drops + retention + query range