Skip to content

Commit 8578cb3

Browse files
authored
feat(billing): add trace metric retention settings to project config (#102147)
1 parent ac997e9 commit 8578cb3

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/sentry/quotas/base.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ def to_object(self) -> Mapping[str, Any]:
7575
DataCategory.LOG_BYTE: "log",
7676
DataCategory.TRANSACTION: "span",
7777
DataCategory.SPAN: "span",
78+
DataCategory.TRACE_METRIC: "traceMetric",
7879
}
7980

8081

tests/sentry/api/endpoints/test_relay_projectconfigs.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ def test_parse_retentions(call_endpoint, default_project):
175175
DataCategory.REPLAY: RetentionSettings(standard=11, downsampled=21),
176176
DataCategory.SPAN: RetentionSettings(standard=12, downsampled=22),
177177
DataCategory.LOG_BYTE: RetentionSettings(standard=13, downsampled=23),
178+
DataCategory.TRACE_METRIC: RetentionSettings(standard=14, downsampled=24),
178179
}
179180
quotas_mock.get_event_retention = lambda x: 45
180181
quotas_mock.get_downsampled_event_retention = lambda x: 90
@@ -189,6 +190,7 @@ def test_parse_retentions(call_endpoint, default_project):
189190
assert safe.get_path(cfg, "config", "retentions") == {
190191
"span": {"standard": 12, "downsampled": 22},
191192
"log": {"standard": 13, "downsampled": 23},
193+
"traceMetric": {"standard": 14, "downsampled": 24},
192194
}
193195

194196

0 commit comments

Comments
 (0)