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

chore(trace-item-types): throw an error if no trace item type is specified #6777

Merged
merged 6 commits into from
Jan 16, 2025

Conversation

colin-sentry
Copy link
Member

@colin-sentry colin-sentry commented Jan 15, 2025

getsentry/sentry#83530 made the sentry backend send trace_item_type with every request, so now we can get rid of this unspecified => span assumption

@colin-sentry colin-sentry requested review from a team as code owners January 15, 2025 21:20
Copy link

codecov bot commented Jan 15, 2025

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
2798 1 2797 11
View the top 1 failed tests by shortest run time
tests.web.rpc.v1.test_endpoint_trace_item_table.test_endpoint_trace_item_table_extrapolation.TestTraceItemTableWithExtrapolation::test_aggregation_on_attribute_column
Stack Traces | 0.237s run time
Traceback (most recent call last):
  File ".../v1/test_endpoint_trace_item_table/test_endpoint_trace_item_table_extrapolation.py", line 209, in test_aggregation_on_attribute_column
    response = EndpointTraceItemTable().execute(message)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File ".../web/rpc/__init__.py", line 125, in execute
    return self.__after_execute(in_msg, out, error)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File ".../web/rpc/__init__.py", line 146, in __after_execute
    raise error
  File ".../web/rpc/__init__.py", line 121, in execute
    out = self._execute(in_msg)
          ^^^^^^^^^^^^^^^^^^^^^
  File ".../rpc/v1/endpoint_trace_item_table.py", line 103, in _execute
    raise BadSnubaRPCRequestException(
snuba.web.rpc.common.exceptions.BadSnubaRPCRequestException: This endpoint requires meta.trace_item_type to be set (are you requesting spans? logs?)

To view more test analytics, go to the Test Analytics Dashboard
📢 Thoughts on this report? Let us know!

@onkar
Copy link
Member

onkar commented Jan 15, 2025

@colin-sentry Can you add test that verifies that BadSnubaRPCRequestException is raised when no trace item type is specified.

@colin-sentry
Copy link
Member Author

@colin-sentry Can you add test that verifies that BadSnubaRPCRequestException is raised when no trace item type is specified.

done

@colin-sentry colin-sentry force-pushed the error_if_no_trace_item_type branch from 4a853d4 to 800a8f1 Compare January 16, 2025 16:09
@colin-sentry colin-sentry merged commit 5775594 into master Jan 16, 2025
31 checks passed
@colin-sentry colin-sentry deleted the error_if_no_trace_item_type branch January 16, 2025 17:59
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