Browse Source

Remove Artifact Bundle Assemble analytics (#57654)

These were added in https://github.com/getsentry/sentry/pull/51685 and
are unused by now.
Arpad Borsos 1 year ago
parent
commit
58fa74113f

+ 0 - 2
src/sentry/analytics/events/__init__.py

@@ -5,8 +5,6 @@ from .alert_rule_ui_component_webhook_sent import *  # noqa: F401,F403
 from .alert_sent import *  # noqa: F401,F403
 from .api_token_created import *  # noqa: F401,F403
 from .api_token_deleted import *  # noqa: F401,F403
-from .artifactbundle_assemble import *  # noqa: F401,F403
-from .artifactbundle_manifest_extracted import *  # noqa: F401,F403
 from .codeowners_assignment import *  # noqa: F401,F403
 from .codeowners_created import *  # noqa: F401,F403
 from .codeowners_updated import *  # noqa: F401,F403

+ 0 - 16
src/sentry/analytics/events/artifactbundle_assemble.py

@@ -1,16 +0,0 @@
-from sentry import analytics
-
-
-class ArtifactBundleAssemble(analytics.Event):
-    type = "artifactbundle.assemble"
-
-    attributes = (
-        analytics.Attribute("user_id", required=False),
-        analytics.Attribute("organization_id"),
-        analytics.Attribute("project_ids"),
-        analytics.Attribute("user_agent", required=False),
-        analytics.Attribute("auth_type", required=False),
-    )
-
-
-analytics.register(ArtifactBundleAssemble)

+ 0 - 14
src/sentry/analytics/events/artifactbundle_manifest_extracted.py

@@ -1,14 +0,0 @@
-from sentry import analytics
-
-
-class ArtifactBundleManifestExtracted(analytics.Event):
-    type = "artifactbundle.manifest_extracted"
-
-    attributes = (
-        analytics.Attribute("organization_id"),
-        analytics.Attribute("project_ids"),
-        analytics.Attribute("has_debug_ids"),
-    )
-
-
-analytics.register(ArtifactBundleManifestExtracted)

+ 1 - 11
src/sentry/api/endpoints/organization_artifactbundle_assemble.py

@@ -2,12 +2,11 @@ import jsonschema
 from rest_framework.request import Request
 from rest_framework.response import Response
 
-from sentry import analytics, options
+from sentry import options
 from sentry.api.api_publish_status import ApiPublishStatus
 from sentry.api.base import region_silo_endpoint
 from sentry.api.bases.organization import OrganizationReleasesBaseEndpoint
 from sentry.api.exceptions import ResourceDoesNotExist
-from sentry.api.utils import get_auth_api_token_type
 from sentry.constants import ObjectStatus
 from sentry.debug_files.upload import find_missing_chunks
 from sentry.models import Project
@@ -131,15 +130,6 @@ class OrganizationArtifactBundleAssembleEndpoint(OrganizationReleasesBaseEndpoin
             }
         )
 
-        analytics.record(
-            "artifactbundle.assemble",
-            user_id=request.user.id if request.user and request.user.id else None,
-            organization_id=organization.id,
-            project_ids=project_ids,
-            user_agent=request.META.get("HTTP_USER_AGENT", ""),
-            auth_type=get_auth_api_token_type(request.auth),
-        )
-
         if is_org_auth_token_auth(request.auth):
             update_org_auth_token_last_used(request.auth, project_ids)
 

+ 1 - 8
src/sentry/tasks/assemble.py

@@ -13,7 +13,7 @@ from django.db import IntegrityError, router
 from django.db.models import Q
 from django.utils import timezone
 
-from sentry import analytics, features, options
+from sentry import features, options
 from sentry.api.serializers import serialize
 from sentry.cache import default_cache
 from sentry.constants import ObjectStatus
@@ -543,13 +543,6 @@ class ArtifactBundlePostAssembler(PostAssembler[ArtifactBundleArchive]):
         # formatted with `-` to 36 chars.
         bundle_id = bundle_id[:36] if bundle_id else uuid.uuid4().hex
 
-        analytics.record(
-            "artifactbundle.manifest_extracted",
-            organization_id=self.organization.id,
-            project_ids=self.project_ids,
-            has_debug_ids=len(debug_ids_with_types) > 0,
-        )
-
         # We don't allow the creation of a bundle if no debug ids and release are present, since we are not able to
         # efficiently index
         if len(debug_ids_with_types) == 0 and not self.release: