Skip to content

Question: Why isError Tag if you can discover that by status code ? #25

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

Open
CarlosPanarello opened this issue Oct 5, 2020 · 1 comment
Labels
question Further information is requested

Comments

@CarlosPanarello
Copy link

In code, the error is set when status code is >= 400 or < 200 . So why this tag exists, if you already send status code? Is it because in another project for b5, you doesn`t have status code and need to set some info about error?

@eabili0
Copy link
Contributor

eabili0 commented Oct 5, 2020

Hello @CarlosPanarello! Thank you for your question!

This is an important point and is a direct result of many discussions we held before on our Big Brother Metric Protocol project.

The information of what is an error is actually application and domain specific. For example, in GraphQL applications, errors are communicated in a HTTP 200 response payload! What this lib implements as default is just what we normally see in java servlet application development. But, for the tech agnostic Protocol we have, we cannot assume such a thing!

That's we why we have 2 different tags: status and isError, making it easier to PromQL developers implement correct, meaningful and reusable alerts and dashboards!


In another note, I think it would be nice to be able to override such behaviour implemented by default in this lib. If you need to customize your isError label values relationship with the ones from status label, feel free to open an issue!

@eabili0 eabili0 added the question Further information is requested label Oct 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants