-
Notifications
You must be signed in to change notification settings - Fork 45
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
Integrate with :telemetry #129
Conversation
Did I quick review and it looks good. Once thing I noticed is that the dep wasn't added to the 'rebar.config.script' file which TBH I don't remember what it was used for... What else could I do to make shackle more elixir friendly? mix config file and a shackle.ex file to expose the main APIs? |
Oh, I think the |
It's an interesting question! I haven't given it much thought because I haven't really been using shackle directly; I've been using buoy. I suspect I'd have a much clearer picture if I write a shackle client in Elixir. I think one big improvement might be having docs generated and uploaded to hexdocs, using an approach similar to EDIT: I found these instructions for releasing |
I got I think it would be pretty straightforward to move type definitions into the modules where they're used the most. |
I cleaned up a lot of the duplicated types in this branch (based on top of this PR branch). The resulting generated documentation is much cleaner, and linking back to definitions and whatnot is much nicer. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
With all respect to
|
@x0id Hey, I'll talk with @rkallos and discuss what we should do. I agree that this implementation is a bit slower because of the ETS calls. Moving forward I see two options:
|
Both are great options, but still, I prefer the first variant, because the second introduces an extra dependency on the telemetry. |
In #133, I removed telemetry as a dependency, and instead reintroduced shackle_hooks, but with a calling convention that is identical to telemetry's: This removes the overhead of the telemetry ETS table lookups, but for now, it does construct many small maps for the @x0id please let me know what you think of my proposed changes 😃 |
@rkallos, ideally I'd implement everything via macros. |
:telemetry
seems to be picking up steam as the way forward for libraries to emit telemetry for applications. This largely replaces your use of?METRICS
calls with matching calls to the newshackle_telemetry
module.Also, a bunch of links in the docs got updated when I regenerated them. It might be worth looking into generating them with
rebar3_ex_doc
so they turn into pretty docs on hexdocs.pm.