Telemetry boundary for observability and metrics.
This port provides a unified interface for emitting telemetry events, measuring function execution times, and recording counters/gauges.
Required Callback
emit/3- Emit a telemetry event with measurements and metadata
Optional Callbacks
measure/3- Time function execution and emit duration eventemit_counter/2- Emit a counter eventemit_gauge/3- Emit a gauge event with a specific value
Summary
Callbacks
Emit a telemetry event with measurements and metadata.
Emit a counter event (increment by 1).
Emit a gauge event with a specific value.
Measure function execution time and emit a telemetry event.
Types
Callbacks
Emit a telemetry event with measurements and metadata.
Parameters
event- The event name (atom) or full event path (list of atoms)metadata- Additional context for the eventmeasurements- Numeric measurements for the event
Emit a counter event (increment by 1).
Useful for tracking occurrences of events like requests, errors, etc.
Emit a gauge event with a specific value.
Useful for tracking point-in-time values like queue sizes, memory usage, active connections, etc.
Measure function execution time and emit a telemetry event.
Wraps the function execution, measures its duration, and emits a telemetry event with the duration measurement.
Returns the result of the function.