Skip to content

Commit

Permalink
Revert "Adds path to metric labels for http blackhole (#1148)" (#1155)
Browse files Browse the repository at this point in the history
This reverts commit 7df73bc.
  • Loading branch information
blt authored Dec 17, 2024
1 parent 02ce0c3 commit e89f160
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Removed
- Revert PR #1148

## [0.25.0]
## Added
- Parse nearly the complete field list of smaps/smaps_rollup in the Linux observer.
Expand Down
9 changes: 3 additions & 6 deletions lading/src/blackhole/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,19 +127,16 @@ struct KinesisPutRecordBatchResponse {
#[allow(clippy::borrow_interior_mutable_const)]
async fn srv(
status: StatusCode,
mut metric_labels: Vec<(String, String)>,
metric_labels: Vec<(String, String)>,
body_bytes: Vec<u8>,
req: Request<Body>,
headers: HeaderMap,
response_delay: Duration,
) -> Result<Response<Body>, hyper::Error> {
let (parts, body) = req.into_parts();
if let Some(path_and_query) = parts.uri.path_and_query() {
metric_labels.push(("path".to_string(), path_and_query.path().to_string()));
}

counter!("requests_received", &metric_labels).increment(1);

let (parts, body) = req.into_parts();

let bytes = body.collect().await?.to_bytes();

match crate::codec::decode(parts.headers.get(hyper::header::CONTENT_ENCODING), bytes) {
Expand Down

0 comments on commit e89f160

Please sign in to comment.