-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
feat(CapMan): QueryBuilders + Search tenant_ids
#45505
feat(CapMan): QueryBuilders + Search tenant_ids
#45505
Conversation
…/querybuilder_tenant_ids
tenant_ids
tenant_ids
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.
it seems like these don't have referrers attached to them. How are they populated?
@@ -173,17 +173,18 @@ def get(self, request: Request, organization) -> Response: | |||
Select a field, define a date range, and group or filter by columns. | |||
""" | |||
with self.handle_query_errors(): | |||
tenant_ids = {"organization_id": organization.id} |
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.
does the referrer get injected somewhere else?
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.
Since referrer is passed to Snuba in every request, I've updated the Snuba query functions in utils/snuba.py
to at least add the referrer per request into tenant ids.
Eg:
sentry/src/sentry/utils/snuba.py
Lines 719 to 721 in b921766
if referrer: | |
kwargs["tenant_ids"] = kwargs.get("tenant_ids") or dict() | |
kwargs["tenant_ids"]["referrer"] = referrer |
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.
lgtm
Overview
QueryBuilder
objects now contain org ID intenant_ids
for their Snuba Requeststenant_ids
to Snuba #44788 for more context