• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

alexferl / zerohttp / 22835555014
94%

Build:
DEFAULT BRANCH: master
Ran 09 Mar 2026 02:14AM UTC
Jobs 1
Files 57
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

09 Mar 2026 02:13AM UTC coverage: 93.239% (-0.03%) from 93.264%
22835555014

push

github

web-flow
feat: add built-in Prometheus-compatible metrics middleware (#41)

* feat: add built-in Prometheus-compatible metrics middleware

Zero-dependency metrics collection with Counter, Gauge, and Histogram
types. Auto-collects HTTP request metrics with customizable labels.
Exposes Prometheus format at /metrics endpoint.

Signed-off-by: alexferl <me@alexferl.com>

* fix(router): use sync.Once for thread-safe finalization

fix(metrics): record panics as 500 and expose registry to context

test: add panic metrics recording tests

feat(examples): add panic endpoint to metrics example

Signed-off-by: alexferl <me@alexferl.com>

* feat(metrics): add middleware metrics for compress, cors, etag, request_body_size
  - Compress: compress_requests_total counter with encoding label
  - CORS: cors_preflight_requests_total and cors_requests_total counters
  - ETag: etag_requests_total (hit/miss) and etag_generated_total counters
  - RequestBodySize: request_body_size_rejected_total counter

Includes tests and updated METRICS.md documentation.

Signed-off-by: alexferl <me@alexferl.com>

* run pre-commit

Signed-off-by: alexferl <me@alexferl.com>

* add coverage to merge functions

Signed-off-by: alexferl <me@alexferl.com>

---------

Signed-off-by: alexferl <me@alexferl.com>

797 of 883 new or added lines in 19 files covered. (90.26%)

6 existing lines in 2 files now uncovered.

7461 of 8002 relevant lines covered (93.24%)

29.49 hits per line

Uncovered Changes

Lines Coverage ∆ File
44
86.63
metrics/metrics.go
17
88.46
2.5% server.go
12
93.37
metrics/middleware.go
8
91.67
metrics/handler.go
2
87.22
-0.08% middleware/hmac_auth.go
2
94.87
-5.13% middleware/request_body_size.go
1
0.0
config/metrics.go

Coverage Regressions

Lines Coverage ∆ File
5
88.46
2.5% server.go
1
87.22
-0.08% middleware/hmac_auth.go
Jobs
ID Job ID Ran Files Coverage
1 22835555014.1 09 Mar 2026 02:14AM UTC 57
93.24
GitHub Action Run
Source Files on build 22835555014
  • Tree
  • List 57
  • Changed 16
  • Source Changed 16
  • Coverage Changed 16
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #22835555014
  • c9e55a3f on github
  • Prev Build on master (#22814681014)
  • Next Build on master (#22837459550)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc