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

feat: Add EAP span subscriptions for devserver #6396

Merged

Conversation

shruthilayaj
Copy link
Member

@shruthilayaj shruthilayaj commented Oct 7, 2024

To enable dev work on EAP alerts, this PR starts an alerts scheduler and executor for EAP span alerts in "separate scheduler and executor mode" with snuba devserver.
It adds dataset configuration for span alerts to work (including enabling commit logs for EAP spans).

Copy link

codecov bot commented Oct 7, 2024

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
2559 1 2558 5
View the top 1 failed tests by shortest run time
tests.utils.streams.test_topics test_valid_topics
Stack Traces | 0.135s run time
Traceback (most recent call last):
  File ".../local/lib/python3.11....../site-packages/sentry_kafka_schemas/sentry_kafka_schemas.py", line 79, in get_topic
    with open(topic_path) as f:
         ^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '.../local/lib/python3.11.../sentry_kafka_schemas/topics/snuba-eap-spans-commit-log.yaml'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File ".../utils/streams/test_topics.py", line 10, in test_valid_topics
    sentry_kafka_schemas.get_topic(
  File ".../local/lib/python3.11....../site-packages/sentry_kafka_schemas/sentry_kafka_schemas.py", line 82, in get_topic
    raise SchemaNotFound
sentry_kafka_schemas.sentry_kafka_schemas.SchemaNotFound

To view individual test run time comparison to the main branch, go to the Test Analytics Dashboard

@@ -129,3 +129,9 @@ mandatory_condition_checkers:
stream_loader:
processor: EAPSpansMessageProcessor
default_topic: snuba-spans
commit_log_topic: snuba-eap-spans-commit-log
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want to call out that this topic doesn't exist in production (double/triple checking this is ok)

@@ -28,7 +28,7 @@ python-dateutil==2.8.2
python-rapidjson==1.8
redis==4.3.4
sentry-arroyo==2.17.6
sentry-kafka-schemas==0.1.112
sentry-kafka-schemas==0.1.113
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

includes this change getsentry/sentry-kafka-schemas#337

@shruthilayaj shruthilayaj marked this pull request as ready for review October 8, 2024 15:20
@shruthilayaj shruthilayaj requested review from a team as code owners October 8, 2024 15:20
@@ -170,6 +170,30 @@ def devserver(*, bootstrap: bool, workers: bool) -> None:
"--auto-offset-reset=latest",
],
),
(
Copy link
Member

@untitaker untitaker Oct 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is an else-branch where you should add the same consumer again. normally in devserver, SEPARATE_SCHEDULER_EXECUTOR_SUBSCRIPTIONS_DEV is False, and subscription executor+scheduler are running in a single consumer (for lower resource usage)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added d803500

@shruthilayaj shruthilayaj merged commit 4db5589 into master Oct 8, 2024
30 checks passed
@shruthilayaj shruthilayaj deleted the shruthi/feat/eap-span-subscriptions-for-devserver branch October 8, 2024 15:55
@getsentry-bot
Copy link
Contributor

PR reverted: ff04932

getsentry-bot added a commit that referenced this pull request Oct 8, 2024
@shruthilayaj shruthilayaj restored the shruthi/feat/eap-span-subscriptions-for-devserver branch October 8, 2024 16:56
shruthilayaj added a commit that referenced this pull request Oct 9, 2024
Same as #6396, since deploying it
without the commit log topic in prod caused the EAP consumer to crash.
getsentry/ops#12369 added the commit log topic
to prod. Also deployed the snuba-k8s pipeline to all regions.

To enable dev work on EAP alerts, this PR starts an alerts scheduler and
executor for EAP span alerts.
It adds dataset configuration for span alerts to work (including
enabling commit logs for EAP spans).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants