Skip to content

Conversation

@rahul-kumar-saini
Copy link
Contributor

Overview

  • Added organization_id to more Snuba Requests, specifically targeting tsdb-modelid:4 queries as they are the biggest chunk of queries Snuba is handling in production
  • Most calls to tsdb.get_range handled as well, some I wasn't able to figure out
  • More context: feat(CapMan): Pass tenant_ids to Snuba #44788

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Mar 1, 2023
except Environment.DoesNotExist:
stats = {g.id: tsdb.make_series(0, **query_params) for g in groups}
else:
org_id = groups[0].project.organization_id if groups else None
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Assumes all groups in the list belong to a single org, let me know if this assumption is incorrect.

Copy link
Member

Choose a reason for hiding this comment

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

that assumption seems correct. is groups guaranteed to have at least one element though?

Copy link
Member

Choose a reason for hiding this comment

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

ah right, if groups will evaluate to False if it is empty.

@rahul-kumar-saini rahul-kumar-saini marked this pull request as ready for review March 1, 2023 23:03
@rahul-kumar-saini rahul-kumar-saini requested a review from a team as a code owner March 1, 2023 23:03
@rahul-kumar-saini rahul-kumar-saini requested a review from a team March 1, 2023 23:03
@rahul-kumar-saini rahul-kumar-saini requested a review from a team as a code owner March 1, 2023 23:03
Copy link
Member

@JoshFerge JoshFerge left a comment

Choose a reason for hiding this comment

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

all look good to me except for group_stream.

except Environment.DoesNotExist:
stats = {g.id: tsdb.make_series(0, **query_params) for g in groups}
else:
org_id = groups[0].project.organization_id if groups else None
Copy link
Member

Choose a reason for hiding this comment

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

that assumption seems correct. is groups guaranteed to have at least one element though?

@rahul-kumar-saini rahul-kumar-saini merged commit 95bafd2 into master Mar 2, 2023
@rahul-kumar-saini rahul-kumar-saini deleted the rahul/feat/more_tsdb_tenant_ids branch March 2, 2023 18:31
@github-actions github-actions bot locked and limited conversation to collaborators Mar 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants