telemetry_async v0.0.2 TelemetryAsync.Handler
GenServer that subscribes to the requested telemetry metrics. The handler will randomly distribute requests to the ShardSupervisor Shards and re-execute the telemetry metrics with :async prepended to the beginning.
A metric like [:test]
will become [:async, :test]
The metrics are detached if the Handler process exits to allow graceful shutdown.
Link to this section Summary
Functions
Returns a specification to start this module under a supervisor.
Starts the Telemetry.Handler. Several options are available
Link to this section Functions
Link to this function
child_spec(arg)
Returns a specification to start this module under a supervisor.
See Supervisor
.
Link to this function
start_link(opts)
Starts the Telemetry.Handler. Several options are available:
- metrics -(required) Must be provided. This is a list of telemetry metric names. They must be lists of atoms, like telemetry accepts
- pool_size - (optional) The size of the ShardSupervisor pool. This defaults to the number of schedulers
- prefix - (optional) An atom that is used to name the individual Shards. Defaults to
TelemetryAsync.Shard
The prefix and pool_size should match a ShardSupervisor started with the same options or the telemetry events will not be re-broadcast.