Periodically gather measurements and publish them as Telemetry events
Branch: master
Clone or download
Latest commit 1973c2e Feb 14, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci Update Elixir used in CI to 1.8.1 (#24) Feb 4, 2019
config Initialize ⚡️ Aug 28, 2018
lib Use a map of measurements (#26) Feb 14, 2019
test Use a map of measurements (#26) Feb 14, 2019
.codecov.yml Generate code coverage reports (#19) Jan 6, 2019
.dialyzer_ignore.exs Sampler API POC (#1) Sep 6, 2018
.formatter.exs Start default Poller with the application (#11) Nov 8, 2018
.gitignore Initialize ⚡️ Aug 28, 2018
LICENSE Prepare 0.1.0 release (#3) Sep 6, 2018
mix.exs Release v0.3.0 Feb 14, 2019
mix.lock Use a map of measurements (#26) Feb 14, 2019


CircleCI Codecov

Allows to periodically collect measurements and dispatch them as Telemetry events.

Telemetry.Poller ships with a default poller for VM measurements:

config :telemetry_poller, :default,
  vm_measurements: :default # or a list such as [:memory, ...]

Poller also provides a convenient API for specifying functions called periodically to dispatch measurements as Telemetry events:

# define custom function dispatching event with value you're interested in
defmodule ExampleApp.Measurements do
  def dispatch_session_count() do
    :telemetry.execute([:example_app, :session_count], ExampleApp.session_count())

  # include custom measurement
  measurements: [
    {ExampleApp.Measurements, :dispatch_session_count, []}
  period: 10_000 # configure sampling period

See documentation for more concrete examples and usage instructions.

Copyright and License

Copyright (c) 2018, Chris McCord and Erlang Solutions.

Telemetry source code is licensed under the Apache License, Version 2.0.