Skip to content

Conversation

@kcons
Copy link
Member

@kcons kcons commented Oct 24, 2025

This allows teams to more easily dashboard and alert on API metrics for the APIs they own.

Impact on cardinality shouldn't be too bad; the set of teams is relatively small, and they should be really strongly correlated with url_name.

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Oct 24, 2025
"ui_request": False,
"rate_limit_type": "fixed_window",
"url_name": "sentry",
"owner": "unowned",
Copy link
Contributor

Choose a reason for hiding this comment

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

Bug: Test Fails Due to Undefined Owner Tag

The test_records_default_api_metrics_with_rate_limit_type test asserts the owner tag as "unowned". However, the RateLimitedEndpoint class doesn't define an owner, so the middleware correctly defaults the owner tag to "unknown", causing the test to fail.

Fix in Cursor Fix in Web

@codecov
Copy link

codecov bot commented Oct 25, 2025

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
41393 1 41392 249
View the top 1 failed test(s) by shortest run time
tests.sentry.sentry_metrics.test_snuba.SnubaMetricsInterfaceTest::test_count_query
Stack Traces | 3.89s run time
#x1B[1m#x1B[.../sentry/sentry_metrics/test_snuba.py#x1B[0m:53: in test_count_query
    data = get_series(
#x1B[1m#x1B[.../snuba/metrics/datasource.py#x1B[0m:835: in get_series
    ).get_snuba_queries()
#x1B[1m#x1B[.../snuba/metrics/query_builder.py#x1B[0m:1146: in get_snuba_queries
    component_entities = metric_field_obj.get_entity(
#x1B[1m#x1B[.../metrics/fields/base.py#x1B[0m:774: in get_entity
    return _get_entity_of_metric_mri(projects, self.metric_object.metric_mri, use_case_id)
#x1B[1m#x1B[.../metrics/fields/base.py#x1B[0m:275: in _get_entity_of_metric_mri
    raise InvalidParams(f"Raw metric {get_public_name_from_mri(metric_mri)} does not exist")
#x1B[1m#x1B[31mE   sentry.exceptions.InvalidParams: Raw metric measurements.speed does not exist#x1B[0m

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

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.

1 participant