Skip to content
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

Enhanced event definitions #6

Open
bryannaegele opened this issue Jul 23, 2020 · 1 comment
Open

Enhanced event definitions #6

bryannaegele opened this issue Jul 23, 2020 · 1 comment
Labels
good first issue Good for newcomers

Comments

@bryannaegele
Copy link
Contributor

bryannaegele commented Jul 23, 2020

Add support for enhanced definitions similar to https://github.com/keathley/finch/blob/master/lib/finch/telemetry.ex by accepting a proplist of [{atom | binary, binary}] in place of a string and formatting accordingly. This should be fairly straightforward to implement.

@bryannaegele bryannaegele added the good first issue Good for newcomers label Jul 23, 2020
@hauleth
Copy link
Contributor

hauleth commented Aug 9, 2021

I was thinking about it, and I think that maybe it would be better to split library into two:

  • Event registration
  • Event extractor

This should make the migrations easier. The main problem I can see is versioning there, as one library using older version of registrator can cause downgrade in whole project.

However I thin that the API should probably use map (as it is required by telemetry anyway) and the values of such map should be atom() | {atom(), list()} | {module(), atom(), list()} so this would allow using full type specs (it could be formatted later to the expected values in format_event/1 function or whatever other user would like to have.

For user convenience we could do the translation in the Elixir macros and provide parse transform for Erlang libraries (unfortunately other languages would be on their own there).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Development

No branches or pull requests

2 participants