brod
brod copied to clipboard
WIP: add telemetry
Thanks for the PR.
BTW. I originally wanted a solution without {telemetry, "~> 1.0"}
in the dependency (and the brod_use_telemetry
to be undefined by default).
So to push the responsibility to the wrapping project.
I have changed the base to dev/telemetry
let's start instrumenting the code, preferably increment with small PRs.
This would be very nice to have. What is needed to get this in?
:wave: Also looking to help push this forward, @zmstone , how can I help?
Use dependency injection. Have measurement points invoke a local, "virtual", telemetry module. That module checks if a telemetry callback module has been registered in the environment: if it has, pass the telemetry on to it, if not, do nothing. The end result is that this project has no hard-coded dependencies in any telemetry framework, but the user can hook one up via the callback module they control.