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

fix(metrics): Change data_category from statsd to metric_bucket #2954

Merged
merged 4 commits into from
Apr 10, 2024
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion sentry_sdk/_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
"session",
"internal",
"profile",
"statsd",
"metric_bucket",
"monitor",
]
SessionStatus = Literal["ok", "exited", "crashed", "abnormal"]
Expand Down
2 changes: 1 addition & 1 deletion sentry_sdk/envelope.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ def data_category(self):
elif ty == "profile":
return "profile"
elif ty == "statsd":
return "statsd"
return "metric_bucket"
elif ty == "check_in":
return "monitor"
else:
Expand Down
5 changes: 0 additions & 5 deletions sentry_sdk/transport.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,11 +222,6 @@ def record_lost_event(
# quantity of 0 is actually 1 as we do not want to count
# empty attachments as actually empty.
quantity = len(item.get_bytes()) or 1
if data_category == "statsd":
# The envelope item type used for metrics is statsd
# whereas the client report category for discarded events
# is metric_bucket
data_category = "metric_bucket"

elif data_category is None:
raise TypeError("data category not provided")
Expand Down