Skip to content

Commit 6e39fc2

Browse files
authored
ref(server): Remove body timing layer (#5493)
1 parent 6757c7c commit 6e39fc2

File tree

4 files changed

+1
-302
lines changed

4 files changed

+1
-302
lines changed

relay-server/src/middlewares/body_timing.rs

Lines changed: 0 additions & 292 deletions
This file was deleted.

relay-server/src/middlewares/mod.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ mod metrics;
1414
mod normalize_path;
1515
mod trace;
1616

17-
mod body_timing;
18-
19-
pub use self::body_timing::*;
2017
pub use self::cors::*;
2118
pub use self::decompression::*;
2219
pub use self::handle_panic::*;

relay-server/src/services/server/mod.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ use tower_http::compression::{CompressionLayer, DefaultPredicate, Predicate};
1717
use tower_http::set_header::SetResponseHeaderLayer;
1818

1919
use crate::constants;
20-
use crate::middlewares::{
21-
self, BodyTimingLayer, CatchPanicLayer, NormalizePath, RequestDecompressionLayer,
22-
};
20+
use crate::middlewares::{self, CatchPanicLayer, NormalizePath, RequestDecompressionLayer};
2321
use crate::service::ServiceState;
2422
use crate::statsd::{RelayCounters, RelayGauges};
2523

@@ -64,7 +62,6 @@ fn make_app(service: ServiceState, f: impl FnOnce(&Config) -> axum::Router<Servi
6462
// - Requests go from top to bottom
6563
// - Responses go from bottom to top
6664
let middleware = ServiceBuilder::new()
67-
.layer(BodyTimingLayer)
6865
.layer(axum::middleware::from_fn(middlewares::metrics))
6966
.layer(CatchPanicLayer::custom(middlewares::handle_panic))
7067
.layer(SetResponseHeaderLayer::overriding(

relay-server/src/statsd.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -603,8 +603,6 @@ pub enum RelayTimers {
603603
BufferEnvelopeCompression,
604604
/// Timing in milliseconds for the time it takes for an envelope to be decompressed.
605605
BufferEnvelopeDecompression,
606-
/// Timing in milliseconds to the time it takes to read an HTTP body.
607-
BodyReadDuration,
608606
/// Timing in milliseconds to count spans in a serialized transaction payload.
609607
CheckNestedSpans,
610608
/// The time it needs to create a signature. Includes both the signature used for
@@ -667,7 +665,6 @@ impl TimerMetric for RelayTimers {
667665
RelayTimers::BufferEnvelopesSerialization => "buffer.envelopes_serialization",
668666
RelayTimers::BufferEnvelopeCompression => "buffer.envelopes_compression",
669667
RelayTimers::BufferEnvelopeDecompression => "buffer.envelopes_decompression",
670-
RelayTimers::BodyReadDuration => "requests.body_read.duration",
671668
RelayTimers::CheckNestedSpans => "envelope.check_nested_spans",
672669
RelayTimers::SignatureCreationDuration => "signature.create.duration",
673670
#[cfg(feature = "processing")]

0 commit comments

Comments
 (0)