Browse Source

fix(devserver): Start both string indexers when metrics are enabled (#36682)

Markus Unterwaditzer 2 years ago
parent
commit
1873bdea05

+ 3 - 0
config/relay/config.yml

@@ -15,4 +15,7 @@ processing:
     # The maximum attachment chunk size is 1MB. Together with some meta data,
     # messages will never get larger than 2MB in total.
     - {name: 'message.max.bytes', value: 2097176}
+  topics:
+    metrics_transactions: ingest-performance-metrics
+    metrics_sessions: ingest-metrics
   redis: redis://sentry_redis:6379

+ 15 - 2
src/sentry/runner/commands/devserver.py

@@ -31,7 +31,20 @@ _DEFAULT_DAEMONS = {
         "--force-offset-reset",
         "latest",
     ],
-    "metrics": ["sentry", "run", "ingest-metrics-consumer-2"],
+    "metrics-rh": [
+        "sentry",
+        "run",
+        "ingest-metrics-consumer-2",
+        "--ingest-profile",
+        "release-health",
+    ],
+    "metrics-perf": [
+        "sentry",
+        "run",
+        "ingest-metrics-consumer-2",
+        "--ingest-profile",
+        "performance",
+    ],
     "profiles": ["sentry", "run", "ingest-profiles"],
 }
 
@@ -264,7 +277,7 @@ and run `sentry devservices up kafka zookeeper`.
                     "`SENTRY_USE_METRICS_DEV` can only be used when "
                     "`SENTRY_EVENTSTREAM=sentry.eventstream.kafka.KafkaEventStream`."
                 )
-            daemons += [_get_daemon("metrics")]
+            daemons += [_get_daemon("metrics-rh"), _get_daemon("metrics-perf")]
 
     if settings.SENTRY_USE_RELAY:
         daemons += [_get_daemon("ingest")]

+ 1 - 1
src/sentry/runner/commands/run.py

@@ -552,7 +552,7 @@ def ingest_consumer(consumer_types, all_consumer_types, **options):
 @click.option("--input-block-size", type=int, default=DEFAULT_BLOCK_SIZE)
 @click.option("--output-block-size", type=int, default=DEFAULT_BLOCK_SIZE)
 @click.option("--factory-name", default="default")
-@click.option("--ingest-profile", default="release-health")
+@click.option("--ingest-profile")
 @click.option("commit_max_batch_size", "--commit-max-batch-size", type=int, default=25000)
 @click.option("commit_max_batch_time", "--commit-max-batch-time-ms", type=int, default=10000)
 def metrics_streaming_consumer(**options):