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(metrics): MRI support for metrics API #50404

Merged
merged 14 commits into from
Jun 12, 2023
Merged

Conversation

obostjancic
Copy link
Member

@obostjancic obostjancic commented Jun 6, 2023

Part of: https://github.com/getsentry/getsentry/issues/10656

Enables usage of MRI as an identifier when querying the metrics API.

Notable changes:

  • OrganizationMetricsEndpoint (metrics/meta) is redesigned and returns all available metrics.
  • OrganizationMetricsDataEndpoint (metrics/data) now supports passing MRIs in field query param. For example field=sum(c:sessions/all@none) is valid and equivalent to field=sum(session.all)

@obostjancic obostjancic requested a review from iambriccardo June 6, 2023 09:22
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Jun 6, 2023
@codecov
Copy link

codecov bot commented Jun 6, 2023

Codecov Report

Merging #50404 (e551e95) into master (268804e) will decrease coverage by 0.01%.
The diff coverage is 90.90%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #50404      +/-   ##
==========================================
- Coverage   81.16%   81.16%   -0.01%     
==========================================
  Files        4861     4861              
  Lines      203823   203827       +4     
  Branches    11159    11159              
==========================================
+ Hits       165435   165438       +3     
- Misses      38142    38143       +1     
  Partials      246      246              
Impacted Files Coverage Δ
src/sentry/snuba/metrics/naming_layer/mapping.py 94.73% <80.00%> (-1.49%) ⬇️
src/sentry/snuba/metrics/query_builder.py 93.26% <86.95%> (-0.45%) ⬇️
src/sentry/api/endpoints/organization_metrics.py 97.82% <100.00%> (+0.91%) ⬆️
src/sentry/snuba/metrics/datasource.py 98.34% <100.00%> (+0.91%) ⬆️

... and 3 files with indirect coverage changes

@obostjancic obostjancic marked this pull request as ready for review June 6, 2023 15:59
@obostjancic obostjancic requested a review from a team as a code owner June 6, 2023 15:59
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.

Great work, left some minor comments!

src/sentry/snuba/metrics/query_builder.py Show resolved Hide resolved
src/sentry/snuba/metrics/query_builder.py Outdated Show resolved Hide resolved
src/sentry/snuba/metrics/query_builder.py Outdated Show resolved Hide resolved
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.

🚢

@obostjancic obostjancic merged commit 7528f45 into master Jun 12, 2023
@obostjancic obostjancic deleted the ogi/feat/metrics-explorer branch June 12, 2023 08:30
@github-actions github-actions bot locked and limited conversation to collaborators Jun 27, 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.

2 participants