Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disabling Statix #27

Open
asummers opened this issue Jun 6, 2018 · 3 comments
Open

Disabling Statix #27

asummers opened this issue Jun 6, 2018 · 3 comments
Labels
Kind:Enhancement Necessary refinements and improvements to existing functionality

Comments

@asummers
Copy link

asummers commented Jun 6, 2018

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!

@zachdaniel
Copy link

Any feedback on this issue?

@lucazulian
Copy link

@asummers can I take this on, if nobody is working on this?

@asummers
Copy link
Author

Feel free! I am no longer using Statix, so I had actually forgotten I had opened this issue.

@lexmag lexmag added the Kind:Enhancement Necessary refinements and improvements to existing functionality label Mar 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Kind:Enhancement Necessary refinements and improvements to existing functionality
Projects
None yet
Development

No branches or pull requests

4 participants