Skip to content

Commit

Permalink
instr(server): Remove temporary metric (#4439)
Browse files Browse the repository at this point in the history
We collected enough data.
  • Loading branch information
jjbayer authored Jan 10, 2025
1 parent 4348234 commit e16613e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 31 deletions.
28 changes: 0 additions & 28 deletions relay-server/src/endpoints/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -395,11 +395,7 @@ pub async fn handle_envelope(

fn emit_envelope_metrics(envelope: &Envelope) {
let client_name = envelope.meta().client_name();
let mut has_transaction = false;
let mut has_attachment = false;
for item in envelope.items() {
has_transaction |= item.ty() == &ItemType::Transaction;
has_attachment |= item.ty() == &ItemType::Attachment;
metric!(
histogram(RelayHistograms::EnvelopeItemSize) = item.payload().len() as u64,
item_type = item.ty().name()
Expand All @@ -415,30 +411,6 @@ fn emit_envelope_metrics(envelope: &Envelope) {
sdk = client_name.name(),
);
}

// BEGIN temporary
if has_transaction && has_attachment {
metric!(
counter(RelayCounters::TransactionsWithAttachments) += 1,
sdk = client_name.name(),
);
relay_log::with_scope(
|scope| {
// Set the organization as user so we can figure out who uses this.
scope.set_tag(
"project_key",
envelope.meta().get_partial_scoping().project_key,
);
},
|| {
relay_log::sentry::capture_message(
"transaction with attachment",
relay_log::sentry::Level::Info,
);
},
);
}
// END temporary
}

#[derive(Debug)]
Expand Down
3 changes: 0 additions & 3 deletions relay-server/src/statsd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -624,8 +624,6 @@ pub enum RelayCounters {
EnvelopeItems,
/// Number of bytes we processed per envelope item.
EnvelopeItemBytes,
/// Number of transactions with attachments seen in the request handler.
TransactionsWithAttachments,
/// Number of times an envelope from the buffer is trying to be popped.
BufferTryPop,
/// Number of envelopes spool to disk.
Expand Down Expand Up @@ -838,7 +836,6 @@ impl CounterMetric for RelayCounters {
RelayCounters::EnvelopeAccepted => "event.accepted",
RelayCounters::EnvelopeRejected => "event.rejected",
RelayCounters::EnvelopeItems => "event.items",
RelayCounters::TransactionsWithAttachments => "transactions_with_attachments",
RelayCounters::EnvelopeItemBytes => "event.item_bytes",
RelayCounters::BufferTryPop => "buffer.try_pop",
RelayCounters::BufferSpooledEnvelopes => "buffer.spooled_envelopes",
Expand Down

0 comments on commit e16613e

Please sign in to comment.