Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions relay-server/src/processing/attachments/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ use crate::processing::{self, CountRateLimited, Output, QuotaRateLimiter};
#[cfg(feature = "processing")]
use crate::services::outcome::DiscardReason;
use crate::services::outcome::Outcome;
use crate::statsd::RelayCounters;
use crate::utils::client_name_tag;

mod forward;
mod process;
Expand Down Expand Up @@ -96,7 +98,14 @@ impl processing::Processor for AttachmentProcessor {
mut attachments: Managed<Self::Input>,
ctx: processing::Context<'_>,
) -> Result<processing::Output<Self::Output>, Rejected<Self::Error>> {
// Temporary counter to figure out which SDKs are still sending standalone attachments.
relay_statsd::metric!(
counter(RelayCounters::StandaloneAttachment) += 1,
sdk = client_name_tag(attachments.headers.meta().client_name())
);

attachments::validate_attachments(&mut attachments, |a| &mut a.attachments, ctx);

let mut attachments = self.limiter.enforce_quotas(attachments, ctx).await?;
process::scrub(&mut attachments, ctx)?;

Expand Down
6 changes: 6 additions & 0 deletions relay-server/src/statsd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1022,6 +1022,11 @@ pub enum RelayCounters {
/// This metric is tagged with:
/// - `sdk`: low-cardinality client name
TraceMetricNilTraceId,
/// Amount of standalone attachments processed.
///
/// This metric is tagged with:
/// - `sdk`: low-cardinality client name
StandaloneAttachment,
}

impl CounterMetric for RelayCounters {
Expand Down Expand Up @@ -1088,6 +1093,7 @@ impl CounterMetric for RelayCounters {
RelayCounters::ErrorProcessed => "event.error.processed",
RelayCounters::CompressedMinidump => "minidump.compressed.count",
RelayCounters::TraceMetricNilTraceId => "trace_metric.nil_trace_id",
RelayCounters::StandaloneAttachment => "processing.standalone_attachment",
}
}
}
Loading