Skip to content

fix: HTTP path normalization misses common high-cardinality patterns #213

Description

@mayankpande88

Problem

normalizeHttpPath in containers/l7.go handles UUIDs, integers, and hex IDs, but misses:

  • Base64 tokens: /auth/callback/eyJhbGciOiJSUzI1NiIs...
  • Date-based paths: /logs/2026-03-07, /api/v1/metrics/2026/03
  • JWT/session tokens: /verify/abc123def456.xyz789...
  • Hash-like slugs: /builds/a1b2c3d4e5f6 (6-char hex not caught by 8+ hex rule)
  • Email addresses in paths: /users/user@example.com/profile

Each unique path creates a new Prometheus time series, leading to cardinality explosion.

Fix

Add normalization patterns for:

  1. Base64-encoded segments (contains = padding or matches base64 charset with length > 20)
  2. Date patterns (YYYY-MM-DD, YYYY/MM/DD)
  3. Dot-separated tokens (JWT-like xxx.yyy.zzz)
  4. Configurable custom patterns via --http-path-normalization-rules (already exists as flag, needs implementation review)

Impact

Medium — reduces Prometheus cardinality on nodes with diverse HTTP traffic.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions