Skip to content

Add CF challenge stat#437

Merged
NGTmeaty merged 2 commits intomainfrom
cf-mitigated-counter
Aug 18, 2025
Merged

Add CF challenge stat#437
NGTmeaty merged 2 commits intomainfrom
cf-mitigated-counter

Conversation

@NGTmeaty
Copy link
Copy Markdown
Collaborator

This is a relatively simple commit to add a counter for CF challenge pages. Part of #366 and will likely have some more stats coming soon :)

@NGTmeaty NGTmeaty requested a review from willmhowes August 18, 2025 01:06
@NGTmeaty NGTmeaty self-assigned this Aug 18, 2025
@NGTmeaty NGTmeaty added enhancement New feature or request observability labels Aug 18, 2025
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Aug 18, 2025

Codecov Report

❌ Patch coverage is 0% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 54.72%. Comparing base (57bdaae) to head (5dc934b).
⚠️ Report is 101 commits behind head on main.

Files with missing lines Patch % Lines
internal/pkg/stats/methods.go 0.00% 6 Missing ⚠️
internal/pkg/stats/prometheus.go 0.00% 5 Missing ⚠️
...rchiver/discard/discarder/cloudflare/cloudflare.go 0.00% 1 Missing ⚠️
internal/pkg/stats/stats.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #437      +/-   ##
==========================================
- Coverage   54.87%   54.72%   -0.16%     
==========================================
  Files         120      120              
  Lines        7333     7346      +13     
==========================================
- Hits         4024     4020       -4     
- Misses       2984     3000      +16     
- Partials      325      326       +1     
Flag Coverage Δ
e2etests 37.24% <0.00%> (-0.07%) ⬇️
unittests 30.85% <0.00%> (-0.12%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@CorentinB
Copy link
Copy Markdown
Collaborator

Considering it's a stat based on discarding, maybe the name should be more precise on that? I could imagine a random user who would read "CF Challenge count" and would think that it's the number of challenges Zeno solved or something like that. What do you think?

Copy link
Copy Markdown
Collaborator

@willmhowes willmhowes left a comment

Choose a reason for hiding this comment

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

lgtm

@NGTmeaty NGTmeaty merged commit d0ee7de into main Aug 18, 2025
5 checks passed
@NGTmeaty NGTmeaty deleted the cf-mitigated-counter branch August 18, 2025 21:11
[]string{"project", "hostname", "version"},
),
cfMitigated: prometheus.NewGaugeVec(
prometheus.GaugeOpts{Name: config.Get().PrometheusPrefix + "cf_challenge_pages_seena", Help: "Total number of CF challenge pages seen"},
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

_seena ? Is this a typo @NGTmeaty ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request observability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants