-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
feat(CapMan): QueryBuilders + Search tenant_ids
#45505
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
Conversation
…/querybuilder_tenant_ids
tenant_idstenant_ids
volokluev
left a comment
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?
| 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 |
wmak
left a comment
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
QueryBuilderobjects now contain org ID intenant_idsfor their Snuba Requeststenant_idsto Snuba #44788 for more context