Skip to content

Commit

Permalink
chore(config): Remove config for emitting attachment flags (#718)
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-auer authored Aug 18, 2020
1 parent bb0cd47 commit 8cbb0fc
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 20 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## Unreleased

**Internal**:

- Remove a temporary flag from attachment kafka messages indicating rate limited crash reports to Sentry. This is now enabled by default. ([#718](https://github.com/getsentry/relay/pull/718))

## 20.8.0

**Features**:
Expand Down
9 changes: 0 additions & 9 deletions relay-config/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -712,9 +712,6 @@ pub struct Processing {
/// Maximum rate limit to report to clients.
#[serde(default = "default_max_rate_limit")]
pub max_rate_limit: Option<u32>,
/// Emits flags for rate limited attachments. Disabled by default.
#[serde(default)]
pub _attachment_flag: bool,
}

impl Default for Processing {
Expand All @@ -732,7 +729,6 @@ impl Default for Processing {
attachment_chunk_size: default_chunk_size(),
projectconfig_cache_prefix: default_projectconfig_cache_prefix(),
max_rate_limit: default_max_rate_limit(),
_attachment_flag: false,
}
}
}
Expand Down Expand Up @@ -1406,11 +1402,6 @@ impl Config {
pub fn max_rate_limit(&self) -> Option<u64> {
self.values.processing.max_rate_limit.map(u32::into)
}

/// Emits flags for rate limited attachments. Disabled by default.
pub fn emit_attachment_rate_limit_flag(&self) -> bool {
self.values.processing._attachment_flag
}
}

impl Default for Config {
Expand Down
12 changes: 2 additions & 10 deletions relay-server/src/actors/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,16 +123,8 @@ impl StoreForwarder {
.map(|content_type| content_type.as_str().to_owned()),
attachment_type: item.attachment_type().unwrap_or_default(),
chunks: chunk_index,
size: if self.config.emit_attachment_rate_limit_flag() {
Some(size)
} else {
None
},
rate_limited: if self.config.emit_attachment_rate_limit_flag() {
Some(item.rate_limited())
} else {
None
},
size: Some(size),
rate_limited: Some(item.rate_limited()),
})
}

Expand Down
1 change: 0 additions & 1 deletion tests/integration/fixtures/relay.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ def inner(
"outcomes": "",
},
"redis": "",
"_attachment_flag": True,
},
}

Expand Down

0 comments on commit 8cbb0fc

Please sign in to comment.