Skip to content

Commit

Permalink
Emit a metric when replacements are skipped (#5809)
Browse files Browse the repository at this point in the history
* emit metrics

* more descriptive name

---------

Co-authored-by: Rachel Chen <[email protected]>
  • Loading branch information
xurui-c and Rachel Chen authored Apr 23, 2024
1 parent b69f85f commit cd1c90f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions snuba/replacers/errors_replacer.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,14 @@ def process_message(
"Skipping replacement for project",
extra={"project_id": processed.get_project_id(), "data": message},
)
metrics.increment(
"replacement_message_skipped",
1,
tags={
"type": type_,
"consumer_group": message.metadata.consumer_group,
},
)
return None

return processed
Expand Down

0 comments on commit cd1c90f

Please sign in to comment.