Skip to content

Conversation

@shanejonas
Copy link
Collaborator

@shanejonas shanejonas commented Sep 5, 2025

📝 Summary

This adds metrics for the url param proxying to a different upstream provider than the default.

It does expose one of the metric vars publicly to test: UrlParamUsage. There isn't any other metrics tests so its the only one exposed.

⛱ Motivation and Context

Usage of this feature will dictate to keep or deprecate.

📷 Screenshots

image

✅ I have run these commands

  • make lint
  • make test
  • go mod tidy

@shanejonas shanejonas force-pushed the feat/add-url-param-usage branch 2 times, most recently from a384cf8 to 8f54c2a Compare September 5, 2025 17:40
@shanejonas shanejonas requested a review from odysseus0 September 5, 2025 19:14
@shanejonas shanejonas force-pushed the feat/add-url-param-usage branch from 8f54c2a to 9b073b6 Compare September 8, 2025 13:32
statusBadRequest = metrics.NewCounter(`http_requests_total{status="400"}`)
statusNotFound = metrics.NewCounter(`http_requests_total{status="404"}`)
statusInternalServerError = metrics.NewCounter(`http_requests_total{status="500"}`)
UrlParamUsage = metrics.NewCounter(`http_requests_params{name="url"}`)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exposed publicly for the test.

@TymKh TymKh merged commit 9678b5e into main Sep 8, 2025
2 checks passed
@TymKh TymKh deleted the feat/add-url-param-usage branch September 8, 2025 18:59
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.

2 participants