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

alexferl / zerohttp / 47483854578
94%

Build:
DEFAULT BRANCH: master
Ran 05 Dec 2026 05:28AM UTC
Jobs 1
Files 95
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

05 Dec 2026 05:26AM UTC coverage: 93.585% (+0.08%) from 93.51%
47483854578

push

github

web-flow
feat: add route introspection and pattern-based metrics labels (#189)

Expose the router's registered routes and let callers resolve a concrete
path to the pattern that serves it.

Add Route{Method, Pattern, Middleware}, Router.Routes() returning a
snapshot sorted by pattern and method, and Router.RoutePattern(method,
path) returning the most specific matching pattern. Groups share their
route tracking with the parent router, and the static file helpers
(Files, FilesDir, Static, StaticDir) are recorded as well.

Fix matchPattern for trailing {name...} and ... catch-alls: the previous
branch was unreachable, so wildcard routes could be reported as
unmatched for methods that were registered on them.

Wire the resolver into the metrics middleware. When metrics run on a
zerohttp server, the request path label becomes the registered pattern,
so "/users/42" is recorded as "/users/{id}" and label cardinality no
longer grows with traffic. Config.RoutePattern can override the resolver
and PathLabelFunc remains the fallback when no route matches.

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

89 of 90 new or added lines in 4 files covered. (98.89%)

9438 of 10085 relevant lines covered (93.58%)

141.03 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
97.73
route.go
Jobs
ID Job ID Ran Files Coverage
1 47483854578.1 05 Dec 2026 05:27AM UTC 95
93.58
GitHub Action Run
Source Files on build 47483854578
  • Tree
  • List 95
  • Changed 4
  • Source Changed 4
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #47483854578
  • d3489108 on github
  • Prev Build on master (#47482650153)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc