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

feat(metrics): Emit negative outcomes when namespaces are disabled #3544

Merged

Conversation

iambriccardo
Copy link
Member

@iambriccardo iambriccardo commented May 6, 2024

This PR implements negative outcomes for metrics that are rejected due to disabled namespace.

Closes: #3532

@iambriccardo iambriccardo marked this pull request as ready for review May 6, 2024 07:15
@iambriccardo iambriccardo requested a review from a team as a code owner May 6, 2024 07:15
@@ -710,7 +725,7 @@ impl Project {

match &mut self.state {
State::Cached(state) => {
let state = state.clone();
let state = Arc::clone(state);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change due to a suggestion in a previous related PR: https://github.com/getsentry/relay/pull/3508/files

@iambriccardo iambriccardo requested a review from Dav1dde May 6, 2024 12:38
if let Some(scoping) = scoping {
if let Some(scoping) = self.scoping() {
if !disabled_namespace_buckets.is_empty() {
utils::reject_metrics(
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here i was torn between allowing multiple outcomes to be supported in reject_metrics but I feel like this implementation is a bit more explicit even though it's more verbose.

@iambriccardo iambriccardo merged commit cde2fcc into master May 7, 2024
22 checks passed
@iambriccardo iambriccardo deleted the riccardo/feat/negative-outcomes-rejected-metric branch May 7, 2024 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Emit negative outcomes when metrics are dropped because of invalid namespace
2 participants