Open kwando opened 4 years ago
Hi @kwando , this is a great idea :)
As cubdb
strives to be small and without dependencies (also to be used in minimal environments like Nerves), the best would be to report to telemetry
only if it's available in the project, and do nothing otherwise. That way, the telemetry
dependency would be optional.
I'll try to find some time for this during the holidays. I'm not sure how to do things conditionally based on available dependencies, but that will be a little exercise to figure out :)
The Code.ensure_loaded?/1
function is useful to check if a module can be loaded or not, for example to check if an optional dependency is present or not. Also, a dependency can be marked as optional: true
in mix.exs
. 🙂
Would be cool if this library exposed metrics with telemetry.
I can give that integration a go if you think it is a worthwhile idea :)