Packages
Allows to periodically collect measurements and dispatch them as Telemetry events
Retired package: Renamed - Package renamed to telemetry_poller: https://hex.pm/packages/telemetry_poller
Current section
Files
Jump to
Current section
Files
telemetry_sampler
README.md
README.md
# Telemetry.SamplerAllows to periodically collect measurements and dispatch them as Telemetry events.Sampler provides a convenient API for specifying functions called periodically to dispatchmeasurements as Telemetry events. It also includes helpers for measuring Erlang virtual machinemetrics:```elixir# define custom function dispatching event with value you're interested indefmodule ExampleApp.Measurements do def dispatch_session_count() do Telemetry.execute([:example_app, :session_count], ExampleApp.session_count()) endendTelemetry.Sampler.start_link( measurements: [ # include custom measurement {ExampleApp.Measurements, :dispatch_session_count, []} # include default VM measurements | Telemetry.Sampler.vm_measurements() ], period: 10_000 # configure sampling period)```See [documentation](https://hexdocs.pm/telemetry_sampler) for more concrete examples and usageinstructions.## Copyright and LicenseCopyright (c) 2018, Chris McCord and Erlang Solutions.Telemetry source code is licensed under the [Apache License, Version 2.0](LICENSE).