arkgil

arkgil

Telemetry.Metrics - common interface for defining metrics based on Telemetry events

Hi everyone :wave:

We’ve just pushed Telemetry.Metrics 0.2.0 to Hex. Version 0.1.0 has been published for a while now, but this version finally makes the library compatible with Telemetry 0.4.0 and brings many other improvements.

In short, Telemetry.Metrics allows you to define how you wish the Telemetry events to be aggregated. For example, the following metric definition

sum("http.request.payload_size")

means that you want to sum up :payload_size measurement of the [:http, :request] Telemetry events.

Telemetry.Metrics doesn’t aggregate the metrics itself, rather it relies on reporters to subscribe to relevant events and aggregate the metrics in a way that makes the most sense for the monitoring system they report to.

I recommend checking out the docs since they contain way more information. Since this version we also have a guide for writing reporters :blush:

Big thank you to all the people involved in discussions around the design and ideas for improvement - we wouldn’t have made it without you :yellow_heart:

Most Liked

arkgil

arkgil

Out of interest, why use string specification instead of array of atoms? These would be equivalent in the idea, but would save on the parsing and restricting separators (for example OpenCensus often uses / to separate metric segments).

It’s just a matter of preference, I think that it just looks nicer. But you can use a list of atoms for both the metric and event name as well.

Another thing is whether this will be rewritten in Erlang (with possible Elixir wrapper) for allowing it to be used with rest of the community?

I personally believe that it should, you and other folks have done a lot of awesome work on opencensus stuff, which means we could have really solid integration without much effort, I suppose. Although I really wish we could generate nicer documentation from the Erlang source code :slightly_frowning_face:

Where Next?

Popular in Libraries Top

Qqwy
TypeCheck: Fast and flexible runtime type-checking for your Elixir projects. Core ideas Type- and function specifications are const...
336 13801 100
New
devonestes
Introducing assertions, the library that helps you write really great test assertions! GitHub: https://github.com/devonestes/assertions ...
New
seancribbs
Today I released a new dialyzer Mix task as the dialyzex package! At the time we started writing this task, the existing dialyzer integra...
New
pkrawat1
Presenting Aviacommerce, open source e-commerce platform in Elixir Aviacommerce is an open source e-commerce platform in Elixir. We at...
New
jakub-zawislak
Hi everyone, I’m coming from the Symfony (PHP) framework. I like Phoenix, but it has a one thing that was build much better in the Symfo...
New
michalmuskala
Hello everybody. I have just released Jason - a new JSON library. You might be wondering, why do we need a new library? The primary foc...
New
blatyo
https://www.conduitframework.com/ The best overview for how things are tied together is this presentation. Modules and functions are pre...
New
Jskalc
Hi! Today, after a couple weeks of development I’ve released v0.1 of LiveVue. It’s a seamless integration of Vue and Phoenix LiveView, i...
New
maltoe
Hello! Came here to announce ChromicPDF, a pet project PDF generator I’ve been working on for the past few months. Why another PDF gener...
New
versilov
Could not wait for the missing Elixir ML libraries to appear, so, I wrote one myself, taking https://github.com/sdwolfz/exlearn as a foun...
New

Other popular topics Top

JDanielMartinez
Hi! May someone helps me, please! I have two apps into an umbrella project: the first one is Database, which manages queries, and the se...
New
Tee
can someone please explain to me how Enum.reduce works with maps
New
ycv005
I have followed this StackOverflow post to install the specific version of Erlang. And When I am running mix ecto.setup then getting fol...
New
grych
Hi folks, Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
639 49522 488
New
quazar
How to set Jason to encode all fields in ecto schema, I don’t care about security and implementing only is taking long list of attributes...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
fireproofsocks
I’m working on defining a simple Ecto schema for a table (in PostGres), but I don’t see where I can define a column as NOT NULL. Conside...
New
lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
myronmarston
The Elixir Typespec docs show the following syntax for keyword lists in typespecs: # ... | [key: type] # keyword lis...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers' Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New

Sub Categories:

We're in Beta

About us Mission Statement