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

fix(capman): emit the bytes scanned metric from db_query #6075

Merged
merged 6 commits into from
Jul 5, 2024

Conversation

volokluev
Copy link
Member

closes https://getsentry.atlassian.net/browse/SNS-2812

Right now the bytes_scanned metric that is used in our customer dashboard and our API abuse dashboard is emitted from the BytesScannedWindowAllocationPolicy (code)

There is a plan to deprecate the BytesScannedWindowPolicy and it already does not exist on replays and spans.

This breaks that dashboard.

This metric should be emitted independently of any policy at a higher level (e.g. db_query)

@volokluev volokluev requested a review from a team as a code owner June 27, 2024 23:54
Copy link

codecov bot commented Jun 28, 2024

Test Failures Detected: Due to failing tests, we cannot provide coverage reports at this time.

❌ Failed Test Results:

Completed 2470 tests with 1 failed, 2465 passed and 4 skipped.

View the full list of failed tests

pytest

  • Test name: tests.web.test_db_query::test_db_record_bytes_scanned

    Traceback (most recent call last):
    File ".../tests/web/test_db_query.py", line 278, in test_db_record_bytes_scanned
    assert metrics[0].tags == {
    AssertionError: assert {'dataset': 'events', 'referrer': 'something', 'storage_key': 'errors_ro'} == {'dataset_name': 'events', 'referrer': 'something', 'storage_key': 'errors_ro'}
    Common items:
    {'referrer': 'something', 'storage_key': 'errors_ro'}
    Left contains 1 more item:
    {'dataset': 'events'}
    Right contains 1 more item:
    {'dataset_name': 'events'}
    Full diff:
    - {'dataset_name': 'events', 'referrer': 'something', 'storage_key': 'errors_ro'}
    & -----
    + {'dataset': 'events', 'referrer': 'something', 'storage_key': 'errors_ro'}

@volokluev volokluev force-pushed the volo/capman/bring_back_bytes_scanned branch from e6ed20b to fb67f8d Compare June 28, 2024 21:01
Copy link
Contributor

@nachivrn nachivrn left a comment

Choose a reason for hiding this comment

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

Looks good.

@xurui-c xurui-c self-requested a review July 3, 2024 22:48
@xurui-c xurui-c merged commit a15ff10 into master Jul 5, 2024
28 checks passed
@xurui-c xurui-c deleted the volo/capman/bring_back_bytes_scanned branch July 5, 2024 19:00
kneeyo1 added a commit that referenced this pull request Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants