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

Emit error metric only if prometheus metrics are enabled #491

Merged

Conversation

rudrakhp
Copy link
Contributor

@rudrakhp rudrakhp commented Nov 21, 2023

Resolves: open-policy-agent/opa#6410

  • Added a test case to check error handling if metrics are disabled, seg faults without this fix.
  • Also removed handling empty InternalErr code as all internal errors are supposed to be created in this package and are guaranteed to have a non-empty code if there is a check error.

@rudrakhp rudrakhp force-pushed the error_metric_optional_fix branch from f125efb to 05c5ffb Compare November 21, 2023 19:13
Signed-off-by: Rudrakh Panigrahi <rudrakh97@gmail.com>
@rudrakhp rudrakhp force-pushed the error_metric_optional_fix branch from 05c5ffb to 52b6ca1 Compare November 21, 2023 19:27
Copy link
Member

@ashutosh-narkar ashutosh-narkar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @rudrakhp!

@ashutosh-narkar ashutosh-narkar merged commit 66532f1 into open-policy-agent:main Nov 21, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Panic in opa-envoy-plugin error metrics
2 participants