-
Notifications
You must be signed in to change notification settings - Fork 90
Description
Hi all.
I feel like I must be missing something obvious.
So if I have a runtime_config: true config for Statix (unsure if relevant here), and I do NOT explicitly start using MyApp.Statix.connect() (because it is disabled for whatever reason), the calls to Statix.increment etc are all seeming to fail complaining that I didn't set the __statix_header__.
"could not fetch application environment :\"Elixir.MyApp.Statix.__statix_header__\" for application :statix because configuration :\"Elixir.MyApp.Statix.__statix_header__\" was not set"
Is the expectation that I have to wrap all the calls in defensive logic to determine if Statix is running? Looking through the code, that would seem to be the case, as there doesn't appear to be logic in there to deal with this case. If so, I would like to propose being able to disable Statix for e.g. tests, and having the library itself handle the "send this metric only if running" logic rather than making app code do that.
Thanks!