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

Get controller labels from controller, not params #320

Merged
merged 2 commits into from
Oct 3, 2023

Commits on Oct 3, 2023

  1. Get controller labels from controller, not params

    I've got an open PR to do this for the default default in
    prometheus_exporter itself:
    
    github.com/discourse/prometheus_exporter/pull/293
    
    But it's unclear whether the maintainers will accept that, and if so how
    long that will take.
    
    In the meantime, we've got quite a bit of noise in our metrics because
    it's currently possible for an HTTP request to overwrite the action /
    controller labels by passing them in as request parameters like this:
    
        curl -v http://127.0.0.1:3000/ --data 'controller=test'
    
    This commit extends the default middleware so we have more sensible
    defaults for both Rails and Sinatra apps. I couldn't work out any good
    labels for sinatra apps that wouldn't be potentially high cardinality,
    so those are just blank.
    richardTowers committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    20f4d51 View commit details
    Browse the repository at this point in the history
  2. Fix rubocop warnings

    richardTowers committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    0f097b1 View commit details
    Browse the repository at this point in the history