Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable admin route for stats/prometheus #6503

Merged
merged 1 commit into from
Jun 11, 2024

Conversation

clayton-gonsalves
Copy link
Contributor

As part of the changes made in #6447
the admin endpoint was tightened to only allow GET requests with path matches as exact.
This change blocked the stats/prometheus endpoint which is used by prometheus to scrape metrics.

Note: If not fixed, this will lead to loss of all prometheus based metrics.

@clayton-gonsalves clayton-gonsalves requested a review from a team as a code owner June 11, 2024 19:56
@clayton-gonsalves clayton-gonsalves requested review from tsaarni and sunjayBhatia and removed request for a team June 11, 2024 19:56
@sunjayBhatia sunjayBhatia requested review from a team, rajatvig and izturn and removed request for a team June 11, 2024 19:57
@clayton-gonsalves clayton-gonsalves added the release-note/small A small change that needs one line of explanation in the release notes. label Jun 11, 2024
@davinci26 davinci26 added the kind/bug Categorizes issue or PR as related to a bug. label Jun 11, 2024
Copy link
Contributor

@davinci26 davinci26 left a comment

Choose a reason for hiding this comment

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

thanks!

Signed-off-by: Clayton Gonsalves <clayton.gonsalves@reddit.com>
Copy link

codecov bot commented Jun 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.64%. Comparing base (7b08831) to head (64c8646).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #6503   +/-   ##
=======================================
  Coverage   81.63%   81.64%           
=======================================
  Files         133      133           
  Lines       15869    15873    +4     
=======================================
+ Hits        12955    12959    +4     
  Misses       2620     2620           
  Partials      294      294           
Files Coverage Δ
internal/envoy/v3/stats.go 100.00% <100.00%> (ø)

Copy link
Member

@tsaarni tsaarni left a comment

Choose a reason for hiding this comment

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

LGTM! 👍

Just for completeness:

(1) The alternative form GET /stats?format=prometheus for fetching prometheus metrics worked but this change is required for /stats/prometheus.

(2) We intentionally keep blocking GET /stats/recentlookups which was allowed before #6447.

@tsaarni tsaarni merged commit 2df0d66 into projectcontour:main Jun 11, 2024
26 checks passed
@tsaarni
Copy link
Member

tsaarni commented Jun 11, 2024

Thank you @clayton-gonsalves!

SamMHD pushed a commit to SamMHD/contour that referenced this pull request Sep 8, 2024
Signed-off-by: Clayton Gonsalves <clayton.gonsalves@reddit.com>
Signed-off-by: Saman Mahdanian <saman@mahdanian.xyz>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. release-note/small A small change that needs one line of explanation in the release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants