Documents telemetry emitted around public Letterpress operations.
Discovery, analysis, compilation, formatting, translation, and rendering emit
:start followed by either :stop or :exception. Metadata never includes
template source, rendered output, values, variable names, or caller
identifiers.
Events
All event names have the form [:letterpress, operation, phase].
:startmeasures:system_timeand includes:profileand:operation:stopmeasures:durationand:input_size, and adds a low-cardinality:resultclassification:exceptionmeasures:durationand:input_size, and adds:kindplus a redacted:reason_class
Durations use native time units. Convert them with
System.convert_time_unit/3 in handlers or metric definitions.
Attaching a handler
:telemetry.attach(
"my-app-letterpress-render",
[:letterpress, :render, :stop],
fn _event, measurements, metadata, _config ->
MyApp.Metrics.record_render(measurements.duration, metadata.result)
end,
nil
)
Summary
Functions
Runs a supported operation with start, stop, and exception telemetry.
Functions
@spec span(atom(), String.t(), non_neg_integer(), (-> term())) :: term()
Runs a supported operation with start, stop, and exception telemetry.
This function preserves the wrapped function's return value and exception semantics. It is used by the public facade; consumers normally attach handlers instead of calling it directly.