-
-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Survey existing metrics definitions across existing libraries #3
Comments
I haven't found any usage of protocols in
Erlang implementation still can provide Elixir-like API. BTW the same should be done for
I would suggest that we would ignore direct API in OT and instead "force" user to always use About existing metrics types, most common I am aware of are:
Some other tools also provide metrics like |
Do you mean creating an Elixir module delegating to the Erlang one? |
@arkgil yes. It could even be written in Erlang, but in general it should be made easy for consumers to "migrate" to newer versions. |
@hauleth I'm not sure what you mean, or maybe I don't see the problem we're trying to solve here 😄 Regarding use of records, I would vote against it, because IMO they are problematic when they show up in stacktraces. I would say that if we aim to have a common structure for both Erlang and Elixir, then maps are the way to go (they might be structs on the Elixir side, although that too might confuse folks when debugging from Erlang). |
As Łukasz wrote in a comment above, metric types supported by the libraries around fall into following buckets:
When it comes to defining metrics, most of the libraries use the approach with the "registry". You call a function, the metric is registered somewhere globally, and the registry is queried whenever the metric is updated or needs to be exported. I haven't found library other than Telemetry.Metrics which uses plain data structures for defining metrics and passing them around. |
How many of those are attempting to interact with multiple implementations without the use of an agent though? I see one of the benefits of using data structures to define metrics is the flexibility they provide for simple migrations via reporters. OpenCensus is the only one I'm aware of that attempts abstracting the destination but moves that abstraction to the agent. |
|
To me, the difference between using a registry and data structures boils down to these two things:
|
From the meeting notes where this action item was created:
The text was updated successfully, but these errors were encountered: