elixometer
elixometer copied to clipboard
Is there anyway to support multiple reporters?
If my understanding is right, only one reporter is supported in Elixometer at the moment, right? If so, is there anyway to support multiple ones?
Right now, no, elixometer only allows you to subscribe to the reporter defined in Application.get_env(:elixometer, :reporter)
.
If you want to submit a PR for adding this, it should be rather easy.
@scohen Got it, I'll try to solve this. I think this should be a useful feature 😁
@tony612 Yes, I agree.
I think it's as simple as allowing a list to be passed to :reporter
and checking for that an iterating over it in https://github.com/pinterest/elixometer/blob/master/lib/elixometer.ex#L349
@scohen There's one problem: How about deprecating :reporter
to support :reporters
?
I don't know how I feel about that; soft deprecation is OK, but should emit a warning. Hard deprecation will break things for people (including us).
What are your thoughts? :reporters
can take a single names or a list of names?
@scohen Yeah, I'm OK with soft deprecation and we can remove :reporter
in a future version. I refer :reporters
only accept a list of names, which is more clear.