Skip to content

fix: report placeholder in prom metrics for invalid request paths#1867

Merged
zone117x merged 2 commits intomasterfrom
fix/invalid-prom-path
Feb 19, 2024
Merged

fix: report placeholder in prom metrics for invalid request paths#1867
zone117x merged 2 commits intomasterfrom
fix/invalid-prom-path

Conversation

@zone117x
Copy link
Contributor

Fixes #1826

When a request path is invalid because it doesn't have a route handler, change the prometheus reporting so that the path name is the placeholder <invalid_path>. This fixes the issue of very long path names, and fixes the issue of log spam from many unique invalid paths.

@github-actions
Copy link

github-actions bot commented Feb 19, 2024

Vercel deployment URL: https://stacks-blockchain-2ct4g3obb-blockstack.vercel.app 🚀

@codecov
Copy link

codecov bot commented Feb 19, 2024

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (b287b7b) 47.01% compared to head (30deef4) 71.76%.
Report is 1 commits behind head on master.

Files Patch % Lines
src/api/init.ts 0.00% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master    #1867       +/-   ##
===========================================
+ Coverage   47.01%   71.76%   +24.75%     
===========================================
  Files          92       92               
  Lines       11912    11911        -1     
  Branches     2624     2624               
===========================================
+ Hits         5600     8548     +2948     
+ Misses       5910     3209     -2701     
+ Partials      402      154      -248     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@zone117x zone117x linked an issue Feb 19, 2024 that may be closed by this pull request
Copy link
Contributor

@CharlieC3 CharlieC3 left a comment

Choose a reason for hiding this comment

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

Thanks for addressing this! We should wait for @rafaelcr but LGTM! :shipit:

@zone117x zone117x merged commit 7921488 into master Feb 19, 2024
@zone117x zone117x deleted the fix/invalid-prom-path branch February 19, 2024 15:58
blockstack-devops pushed a commit that referenced this pull request Feb 19, 2024
## [7.8.2](v7.8.1...v7.8.2) (2024-02-19)

### Bug Fixes

* report placeholder in prom metrics for invalid request paths ([#1867](#1867)) ([7921488](7921488))
@blockstack-devops
Copy link
Contributor

🎉 This PR is included in version 7.8.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

blockstack-devops pushed a commit that referenced this pull request Feb 20, 2024
## [7.9.0-nakamoto.5](v7.9.0-nakamoto.4...v7.9.0-nakamoto.5) (2024-02-20)

### Bug Fixes

* report placeholder in prom metrics for invalid request paths ([#1867](#1867)) ([7921488](7921488))
* **rosetta:** use /v2/fees/transaction for fee estimation ([b287b7b](b287b7b))
* sql transactional consistency bug with fetching chaintip in various areas ([#1853](#1853)) ([07339c0](07339c0))
@blockstack-devops
Copy link
Contributor

🎉 This PR is included in version 7.9.0-nakamoto.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Prometheus metric label exceeds length limit

4 participants