Skip to content

Commit

Permalink
Revert "ref: record if transactions ever have plugin tags (#79787)"
Browse files Browse the repository at this point in the history
This reverts commit 7773aca.

Co-authored-by: lynnagara <[email protected]>
  • Loading branch information
getsentry-bot and lynnagara committed Oct 28, 2024
1 parent ac698f6 commit d8c5335
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/sentry/event_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ def save_error_events(
except ProjectKey.DoesNotExist:
pass

_derive_plugin_tags_many(jobs, projects, is_transaction=True)
_derive_plugin_tags_many(jobs, projects)
_derive_interface_tags_many(jobs)

# Load attachments first, but persist them at the very last after
Expand Down Expand Up @@ -829,21 +829,14 @@ def _get_event_user_many(jobs: Sequence[Job], projects: ProjectsMapping) -> None


@sentry_sdk.tracing.trace
def _derive_plugin_tags_many(
jobs: Sequence[Job], projects: ProjectsMapping, is_transaction: bool = False
) -> None:
def _derive_plugin_tags_many(jobs: Sequence[Job], projects: ProjectsMapping) -> None:
# XXX: We ought to inline or remove this one for sure
plugins_for_projects = {p.id: plugins.for_project(p, version=None) for p in projects.values()}

for job in jobs:
for plugin in plugins_for_projects[job["project_id"]]:
added_tags = safe_execute(plugin.get_tags, job["event"])

if added_tags:
# XXX: Temporarily record if any transactions actually have added tags, in order to
# determine whether this can be safely removed. This metric should be removed once validated.
if is_transaction:
metrics.incr("save_transaction_events.has_added_tags")
data = job["data"]
# plugins should not override user provided tags
for key, value in added_tags:
Expand Down

0 comments on commit d8c5335

Please sign in to comment.