Skip to content

fix(metrics): clone fasthttp method before Prometheus labels - #122

Merged
lodygens merged 1 commit into
mainfrom
fix/metrics-unsafe-method-labels
Sep 4, 2026
Merged

lodygens merged 1 commit into
mainfrom
fix/metrics-unsafe-method-labels

Conversation

@lodygens

@lodygens lodygens commented Sep 4, 2026

Copy link
Copy Markdown
Member
  • Fiber/fasthttp Method() strings were stored as Prometheus label values without cloning; buffer reuse corrupted GET into GETT and made /metrics fail gather with duplicate series.
  • Clone method (and sanitize path/status) before recording http_requests_total / http_request_duration_seconds, so cafe-discovery-api stays scrapeable and platform_up can go back to 1.

Unsafe Fiber/fasthttp Method() views were stored in http_* metric labels;
buffer reuse turned GET into GETT and made /metrics gather fail with
duplicate series, keeping platform_up at 0.
@lodygens
lodygens merged commit cad33b6 into main Sep 4, 2026
2 checks passed
@lodygens
lodygens deleted the fix/metrics-unsafe-method-labels branch September 4, 2026 15:23
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