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

Prometheus metrics #5

Closed
tlex opened this issue Dec 6, 2020 · 2 comments
Closed

Prometheus metrics #5

tlex opened this issue Dec 6, 2020 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@tlex
Copy link
Member

tlex commented Dec 6, 2020

Add prometheus metrics (prefixed with csp_) for:

  • Violation reports (violation_reports_total)
  • Version information (version_info)

Labels if the report is valid:

  • document_uri
  • blocked_uri
  • violated_directive
  • original_policy
  • line_number
  • state="valid"

Labels if the report is invalid:

  • state=invalid
  • reason=~"(empty|non-json|non-csp)"
@tlex tlex added the enhancement New feature or request label Dec 6, 2020
@tlex tlex self-assigned this Dec 6, 2020
ix-ai-bot pushed a commit that referenced this issue Dec 6, 2020
@tlex
Copy link
Member Author

tlex commented Dec 6, 2020

Implemented two metrics for violation reports:

  • csp_invalid_violation_reports_total for the invalid ones
  • csp_valid_violation_reports_total for the valid ones

For the invalid reports, added the reason too-large as well, for when MAX_CONTENT_LENGTH is reached

ix-ai-bot pushed a commit that referenced this issue Dec 6, 2020
ix-ai-bot pushed a commit that referenced this issue Dec 6, 2020
#5 Add prometheus metrics

See merge request ix.ai/csp!7
@tlex
Copy link
Member Author

tlex commented Dec 6, 2020

Closed by faea494

@tlex tlex closed this as completed Dec 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant