Skip to content

Commit

Permalink
logging(unmerge): adds unmerge logging (#56097)
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephen Cefali authored Sep 12, 2023
1 parent 533d952 commit 36121c1
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/sentry/tasks/unmerge.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,14 @@ def unmerge(*posargs, **kwargs):
referrer="unmerge",
tenant_ids={"organization_id": source.project.organization_id},
)
# Log info related to this unmerge
logger.info(
"unmerge.check",
extra={
"source_id": source.id,
"num_events": len(events),
},
)

# If there are no more events to process, we're done with the migration.
if not events:
Expand Down Expand Up @@ -530,6 +538,15 @@ def unmerge(*posargs, **kwargs):
source.update(**get_group_backfill_attributes(caches, source, source_events))

destinations = dict(args.destinations)
# Log info related to this unmerge
logger.info(
"unmerge.destinations",
extra={
"source_id": source.id,
"source_events": len(source_events),
"destination_events": len(destination_events),
},
)

# XXX: This is only actually able to create a destination group and migrate
# the group hashes if there are events that can be migrated. How do we
Expand Down

0 comments on commit 36121c1

Please sign in to comment.