Skip to content

feat(traefik-metrics): add per-router metrics to eliminate catchall n…#203

Merged
Dhanrajkshirsagar merged 1 commit into
mainfrom
feat/traefik-router-metrics
Jun 1, 2026
Merged

feat(traefik-metrics): add per-router metrics to eliminate catchall n…#203
Dhanrajkshirsagar merged 1 commit into
mainfrom
feat/traefik-router-metrics

Conversation

@Dhanrajkshirsagar

Copy link
Copy Markdown
Contributor

…oise

Traefik entrypoint metrics are aggregate across all traffic including unmatched requests (catchall@internal), inflating the error rate.

Add CollectRouters which scrapes traefik_router_requests_total and traefik_router_request_duration_seconds_* per router, skipping all @internal routers. Each router maps 1:1 to a deployed app so the error rate reflects real app traffic only.

Sends as metric_type: traefik.router with router_name and entrypoint_name attributes for correlation with deployed apps.

…oise

Traefik entrypoint metrics are aggregate across all traffic including
unmatched requests (catchall@internal), inflating the error rate.

Add CollectRouters which scrapes traefik_router_requests_total and
traefik_router_request_duration_seconds_* per router, skipping all
@internal routers. Each router maps 1:1 to a deployed app so the
error rate reflects real app traffic only.

Sends as metric_type: traefik.router with router_name and
entrypoint_name attributes for correlation with deployed apps.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Dhanrajkshirsagar Dhanrajkshirsagar merged commit 73336fd into main Jun 1, 2026
@Dhanrajkshirsagar Dhanrajkshirsagar deleted the feat/traefik-router-metrics branch June 1, 2026 16:38
Dhanrajkshirsagar pushed a commit that referenced this pull request Jun 1, 2026
PR #203 was merged before the mock fix landed, so main is missing
CollectRouters on MockTraefikCollector and the default CollectRouters
stub in setupTestMetricsPusher. Adds both so the test suite compiles
and passes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

1 participant