Skip to content

Commit

Permalink
feat(eap): send trace_item_type with every request (#83530)
Browse files Browse the repository at this point in the history
There's a way to tell EAP what 'type' of thing you are requesting now -
it would make sense to make this field mandatory in snuba, so let's send
it from sentry consistently.
  • Loading branch information
colin-sentry authored Jan 15, 2025
1 parent 945f3e5 commit 01116d3
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion requirements-base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ rfc3986-validator>=0.1.1
sentry-arroyo>=2.19.9
sentry-kafka-schemas>=0.1.128
sentry-ophio==1.0.0
sentry-protos>=0.1.37
sentry-protos>=0.1.49
sentry-redis-tools>=0.1.7
sentry-relay>=0.9.4
sentry-sdk[http2]>=2.19.2
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev-frozen.txt
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ sentry-forked-djangorestframework-stubs==3.15.2.post1
sentry-forked-email-reply-parser==0.5.12.post1
sentry-kafka-schemas==0.1.128
sentry-ophio==1.0.0
sentry-protos==0.1.39
sentry-protos==0.1.49
sentry-redis-tools==0.1.7
sentry-relay==0.9.4
sentry-sdk==2.19.2
Expand Down
2 changes: 1 addition & 1 deletion requirements-frozen.txt
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ sentry-arroyo==2.19.9
sentry-forked-email-reply-parser==0.5.12.post1
sentry-kafka-schemas==0.1.128
sentry-ophio==1.0.0
sentry-protos==0.1.39
sentry-protos==0.1.49
sentry-redis-tools==0.1.7
sentry-relay==0.9.4
sentry-sdk==2.19.2
Expand Down
3 changes: 2 additions & 1 deletion src/sentry/search/eap/spans.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import sentry_sdk
from parsimonious.exceptions import ParseError
from sentry_protos.snuba.v1.request_common_pb2 import RequestMeta
from sentry_protos.snuba.v1.request_common_pb2 import RequestMeta, TraceItemType
from sentry_protos.snuba.v1.trace_item_attribute_pb2 import (
AttributeKey,
AttributeValue,
Expand Down Expand Up @@ -68,6 +68,7 @@ def resolve_meta(self, referrer: str) -> RequestMeta:
project_ids=self.params.project_ids,
start_timestamp=self.params.rpc_start_date,
end_timestamp=self.params.rpc_end_date,
trace_item_type=TraceItemType.TRACE_ITEM_TYPE_SPAN,
)

@sentry_sdk.trace
Expand Down
1 change: 1 addition & 0 deletions src/sentry/utils/snuba_rpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ def rpc(
project_ids=[project.id for project in projects],
start_timestamp=start_time_proto,
end_timestamp=end_time_proto,
trace_item_type=TraceItemType.TRACE_ITEM_TYPE_SPAN,
),
aggregate=AggregateBucketRequest.FUNCTION_SUM,
filter=TraceItemFilter(
Expand Down

0 comments on commit 01116d3

Please sign in to comment.