-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
refs(metrics) Count/measure the number of issues on the issue page. #35422
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
Changes from all commits
93375bc
142cdc1
68b9d62
cdb6b8e
56f3302
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ | |
from rest_framework.exceptions import ParseError, PermissionDenied | ||
from rest_framework.request import Request | ||
from rest_framework.response import Response | ||
from sentry_sdk import Hub | ||
|
||
from sentry import features, search | ||
from sentry.api.bases import OrganizationEventPermission, OrganizationEventsEndpointBase | ||
|
@@ -345,6 +346,10 @@ def get(self, request: Request, organization) -> Response: | |
self.add_cursor_headers(request, response, cursor_result) | ||
|
||
# TODO(jess): add metrics that are similar to project endpoint here | ||
transaction = Hub.current.scope.transaction | ||
if transaction: | ||
transaction.set_measurement("issues.unresolved", len(cursor_result)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why don't we have a global There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. commented above
|
||
|
||
return response | ||
|
||
@track_slo_response("workflow") | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could be wrong here since I'm not in issues code very much, but if a user visits the
For Review
tab directly via url (ie/organizations/sentry/issues/?query=is%3Aunresolved+is%3Afor_review+assigned_or_suggested%3A%5Bme%2C+none%5D&sort=inbox
), wouldn't this measurement become inaccurate? It's reporting forissues.unresolved
but the actual measurement should be forissues.for_review
.