opencensus-erlang
opencensus-erlang copied to clipboard
Use gen_event for metrics and traces sending
why?
@deadtrickster because right now we are writing something similar on our own, and gen_event
has some nice features that can help with management of the reporters/exporters, for example it provides support for deregistration or swapping listeners. Also this would provide interface similar to the 3rd pilar of observability - logs, which are using gen_event
as logging dispatcher (both Elixir's Logger
and Erlang's logger
use that).
I don't think logger uses gen_event.
@tsloughter yeah, my bad.
can you throw some code? I still don't quite get the idea
@deadtrickster what do you mean by the code? You want PR with the migration to the gen_event
?
I think he just meant some code that'd show how it'd work.
I don't think it helps because as far as I know we'd still need the process for notifying the manager to kick off the events.
@tsloughter yes, we would need, but it could be shared one, I am in the process of writing something that will show what I have in mind for that.
Very rough and very WIP migration #136. However it shows the base idea how I would organise the code.