Expand description
Exporters: where finished spans go.
Span::finish hands the span to every registered
Exporter whose Exporter::sample accepts it. None discards
spans, Stdout writes JSON lines, Pretty writes colourful
multi-line output for a terminal, and Sentry reports errors to Sentry.
PHP: the classes of Utopia\Span\Exporter.
Structs§
- Http
Transport - Sends envelopes over HTTP/1.1 (TLS with the WebPKI roots) in the background: on the current runtime, or on a thread of its own outside one. Failures are written to standard error. The whole exchange times out after one second, the connection after half a second.
- None
- Discards every span:
Exporter::sampleis alwaysfalse. - Pretty
- Writes each span as a coloured block for local development: a header
(action, duration, short trace id), the attributes other than
span.*aligned in a column withlevelfirst, the error with at mostmax_trace_framesstack frames, and a separator linewidthwide. Spans with an error go to standard error, the others to standard output. - Request
- An HTTP request to Sentry’s envelope endpoint.
- Sentry
- Reports spans at warning level or above that carry an error as Sentry issues.
- Stdout
- Writes each span as one line of JSON (NDJSON):
levelandactionfirst, then every attribute, then the error (error.type,error.message,error.code,error.file,error.line,error.tracewith at mostmax_trace_framesframes,error.trace_truncated). Spans with an error go to standard error, the others to standard output.
Enums§
- Sentry
Field - Where a span attribute goes in a Sentry event.
- Sentry
Level - The levels of Sentry’s event API.
Traits§
Type Aliases§
- Sampler
- Decides whether an exporter exports a span.