arkgil
Telemetry - Dynamic dispatching library for metrics and instrumentations (v0.3.0 released!)
Hi all!
I’m happy to announce that Telemetry v0.3.0 is out! This release marks the conversion from Elixir to Erlang so that all the libraries and projects on the BEAM can expose useful instrumentation data via Telemetry events! ![]()
This version is not compatible with the previous versions, below you will find the description of how to move from 0.2.0 to 0.3.0.
For those who publish
The only change in how the events are emitted is the module name:
# 0.2.0
Telemetry.execute([:my, :event], 20, %{some: :metadata})
# 0.3.0
:telemetry.execute([:my, :event], 20, %{some: :metadata})
For those who subscribe
The attach and attach_many have been changed a bit - now they accept an anonymous function as the handler function instead of a module/function pair.
# 0.2.0
Telemetry.attach("my-handler", [:my, :event], EventHandler, :handle, %{some: :config})
# 0.3.0
:telemetry.attach("my-handler", [:my, :event], &EventHandler.handle/4, %{some: :config})
To see all the changes please check out the change log.
Credits
Many thanks to @tristan for all of his help on the rewrite
We wouldn’t have made it in 2018 without him ![]()
Also, a big thank you to all people supporting and using the project, asking questions and submitting feedback!
Feedback
Please let us know what you think about the release here or on the issue tracker.
Links
Most Liked
arkgil
Hi folks! ![]()
We have just released Telemetry 0.4.0. With this version, Telemetry events now carry a map of measurements instead of a single measurement. This is useful in cases when there are multiple values describing what just happened, e.g. in case of HTTP request the event might include decompression time, payload size, and processing time:
:telemetry.execute(
[:http, :request],
%{payload_size: 12874, processing_time: 120, decompression_time: 5},
%{status: 200, path: "/..."}
)
Previously, each measurement needed to be emitted in a dedicated event. Now the event tells that a thing happened, and measurements and metadata describe its properties.
This change is backwards-compatible for event publishers, i.e. you can still call :telemetry.execute/3 with a single value. However, event handlers need to handle a map of measurements now.
Last but not least, thanks for the awesome feedback from the community which lead to this release!
Ludwik
Hey, I’ve just implemented InfluxDB reporter for Telemetry:
https://github.com/ludwikbukowski/telemetry_influxdb
tristan
True, and I do see the appeal of wanting to something for “free” if the information is already there in some form.
But keep in mind how much influence you’ll have with the Elixir community with this library and the documentation around it. And since it is mostly new, not something existing in people’s code they can simply tap into today but will instead be instrumenting in the future, it can start for the “right place”. Meaning instead of creating spans have a lib for annotating spans through different libs like opencensus/ex_ray/etc, and documentation for Telemetry explaining how its events can be used to annotate spans in a distributed trace.
Because of the influence on the community to come from a library with backing like telemetry has this will help guide people to checkout distributed tracing solutions.
Popular in Announcing
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance









