Skip to content

Commit d004a6f

Browse files
authored
Test(generic-metrics): Add tests for process message flow for generic metrics pipeline (#55950)
### Overview Adds an additional test for process_message where it is on the generic metrics pipeline (before it is only on the release health pipeline)
1 parent f71a22a commit d004a6f

File tree

4 files changed

+672
-26
lines changed

4 files changed

+672
-26
lines changed

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -865,7 +865,6 @@ module = [
865865
"tests.sentry.sentry_metrics.limiters.test_writes_limiter",
866866
"tests.sentry.sentry_metrics.test_base_indexer",
867867
"tests.sentry.sentry_metrics.test_batch",
868-
"tests.sentry.sentry_metrics.test_multiprocess_steps",
869868
"tests.sentry.snuba.metrics.test_snql",
870869
"tests.sentry.snuba.test_tasks",
871870
"tests.sentry.tagstore.test_types",

src/sentry/sentry_metrics/configuration.py

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def get_ingest_config(
9898
)
9999
)
100100

101-
if db_backend == IndexerStorage.MOCK:
101+
if (use_case_key, db_backend) == (UseCaseKey.RELEASE_HEALTH, IndexerStorage.MOCK):
102102
_register_ingest_config(
103103
MetricsIngestConfiguration(
104104
db_backend=IndexerStorage.MOCK,
@@ -108,13 +108,30 @@ def get_ingest_config(
108108
use_case_id=use_case_key,
109109
internal_metrics_tag="release-health",
110110
writes_limiter_cluster_options={},
111-
writes_limiter_namespace="test-namespace",
111+
writes_limiter_namespace="test-namespace-rh",
112112
cardinality_limiter_cluster_options={},
113113
cardinality_limiter_namespace=RELEASE_HEALTH_PG_NAMESPACE,
114114
should_index_tag_values=True,
115115
)
116116
)
117117

118+
if (use_case_key, db_backend) == (UseCaseKey.PERFORMANCE, IndexerStorage.MOCK):
119+
_register_ingest_config(
120+
MetricsIngestConfiguration(
121+
db_backend=IndexerStorage.MOCK,
122+
db_backend_options={},
123+
input_topic="topic",
124+
output_topic="output-topic",
125+
use_case_id=use_case_key,
126+
internal_metrics_tag="perf",
127+
writes_limiter_cluster_options={},
128+
writes_limiter_namespace="test-namespace-perf",
129+
cardinality_limiter_cluster_options={},
130+
cardinality_limiter_namespace=PERFORMANCE_PG_NAMESPACE,
131+
should_index_tag_values=False,
132+
)
133+
)
134+
118135
return _METRICS_INGEST_CONFIG_BY_USE_CASE[(use_case_key, db_backend)]
119136

120137

0 commit comments

Comments
 (0)