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(ingest): Add span instrumentation for process_transaction_no_celery #79238

Merged
merged 3 commits into from
Oct 17, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions src/sentry/ingest/consumer/processors.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ def process_transaction_no_celery(
):
# Delete the event payload from cache since it won't show up in post-processing.
if cache_key:
event_processing_store.delete_by_key(cache_key)
with sentry_sdk.start_span(op="event_processing_store.delete_by_key"):
event_processing_store.delete_by_key(cache_key)
return

manager = EventManager(data)
Expand All @@ -88,7 +89,9 @@ def process_transaction_no_celery(
data = manager.get_data()
if not isinstance(data, dict):
data = dict(data.items())
event_processing_store.store(data)

with sentry_sdk.start_span(op="event_processing_store.store"):
event_processing_store.store(data)


@trace_func(name="ingest_consumer.process_event")
Expand Down Expand Up @@ -230,7 +233,8 @@ def process_event(

if data.get("type") == "transaction":
if no_celery_mode:
process_transaction_no_celery(data, project_id, cache_key, start_time)
with sentry_sdk.start_span(op="ingest_consumer.process_transaction_no_celery"):
process_transaction_no_celery(data, project_id, cache_key, start_time)
else:
# No need for preprocess/process for transactions thus submit
# directly transaction specific save_event task.
Expand Down
Loading