Skip to content
Merged
Changes from all commits
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
7 changes: 7 additions & 0 deletions src/sentry/api/endpoints/organization_sdk_updates.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
from distutils.version import LooseVersion
from itertools import chain, groupby

import sentry_sdk
from django.utils import timezone
from rest_framework.response import Response

from sentry.api.bases import OrganizationEventsEndpointBase
from sentry.sdk_updates import SdkIndexState, SdkSetupState, get_suggested_updates
from sentry.snuba import discover
from sentry.utils.numbers import format_grouped_length


def by_sdk_name(sdk):
Expand Down Expand Up @@ -63,6 +65,11 @@ def get(self, request, organization):

project_ids = self.get_requested_project_ids(request)
projects = self.get_projects(request, organization, project_ids)

len_projects = len(project_ids)
Copy link
Member

Choose a reason for hiding this comment

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

can we add the ungrouped tag here too?

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 actually was intentionally limiting the number of tags, I don't usually use ungrouped. Do you think it'd be helpful?

Copy link
Member

Choose a reason for hiding this comment

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

Yeah ungrouped has been helpful in debugging before, one more tag shouldn't be a huge deal and imo better to have it and not use it than want it and not have it 🤷

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah np np

sentry_sdk.set_tag("query.num_projects", len_projects)
sentry_sdk.set_tag("query.num_projects.grouped", format_grouped_length(len_projects))

if len(projects) == 0:
return Response([])

Expand Down