Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(config): Remove config for emitting attachment flags #718

Merged
merged 3 commits into from
Aug 18, 2020
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
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