Skip to content
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(meta): Add functions to query metrics meta tables #69803

Merged
merged 3 commits into from Apr 30, 2024

Conversation

evanh
Copy link
Member

@evanh evanh commented Apr 26, 2024

Generic metrics now have tables that store meta data about the metrics, notably
the unique metric IDs, tag keys and tag values for any data received.

This adds functions to query those tables and return the relevant values.

Depends on getsentry/snuba#5824

Generic metrics now have tables that store meta data about the metrics, notably
the unique metric IDs, tag keys and tag values for any data received.

This adds functions to query those tables and return the relevant values.
@evanh evanh requested a review from a team as a code owner April 26, 2024 20:10
@evanh evanh requested a review from iambriccardo April 26, 2024 20:10
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Apr 26, 2024
Copy link
Member

@iambriccardo iambriccardo left a comment

Choose a reason for hiding this comment

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

Amazing work, thanks so much!

@@ -519,3 +530,159 @@ def convert_snuba_result(
if reverse_resolve:
data_point[key] = reverse_resolve
return snuba_result


def fetch_metric_mris(
Copy link
Member

Choose a reason for hiding this comment

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

Would it be possible to return the project_id -> [MRI] mapping? Since we use this information in our endpoints.

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 I can change that.

@evanh evanh enabled auto-merge (squash) April 30, 2024 17:40
@evanh evanh merged commit 7b994e2 into master Apr 30, 2024
47 checks passed
@evanh evanh deleted the evanh/feat/add-meta-functions-to-metrics-layer branch April 30, 2024 18:07
Copy link

sentry-io bot commented May 8, 2024

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

  • ‼️ AssertionError: assert 2 == 1 pytest.runtest.protocol tests/snuba/test_metric... View Issue

Did you find this useful? React with a 👍 or 👎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Backend Automatically applied to PRs that change backend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants