Skip to content

Commit 9ebd80d

Browse files
Revert "perf(trace-explorer): Service Entry spans always have group 0 (#72817)"
This reverts commit 0d4df7e. Co-authored-by: Zylphrex <[email protected]>
1 parent 7eb792b commit 9ebd80d

File tree

3 files changed

+3
-14
lines changed

3 files changed

+3
-14
lines changed

Diff for: src/sentry/api/endpoints/organization_traces.py

+2-9
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
SpansIndexedQueryBuilder,
2929
TimeseriesSpanIndexedQueryBuilder,
3030
)
31-
from sentry.search.events.constants import TIMEOUT_SPAN_ERROR_MESSAGE, UNCLASSIFIED_SPAN_GROUP
31+
from sentry.search.events.constants import TIMEOUT_SPAN_ERROR_MESSAGE
3232
from sentry.search.events.types import ParamsType, QueryBuilderConfig, SnubaParams, WhereType
3333
from sentry.sentry_metrics.querying.samples_list import SpanKey, get_sample_list_executor_cls
3434
from sentry.services.hybrid_cloud.organization import RpcOrganization
@@ -854,18 +854,11 @@ def get_traces_breakdown_projects_query(
854854
) -> QueryBuilder:
855855
trace_ids_str = ",".join(trace_ids)
856856
trace_ids_condition = f"trace:[{trace_ids_str}]"
857-
query = " ".join(
858-
[
859-
"is_transaction:1", # service entry spans
860-
f"group:{UNCLASSIFIED_SPAN_GROUP}", # service entry spans do not have a group
861-
trace_ids_condition,
862-
],
863-
)
864857
return SpansIndexedQueryBuilder(
865858
Dataset.SpansIndexed,
866859
params,
867860
snuba_params=snuba_params,
868-
query=query,
861+
query=f"is_transaction:1 {trace_ids_condition}",
869862
selected_columns=[
870863
"trace",
871864
"project",

Diff for: src/sentry/search/events/constants.py

-3
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,6 @@
5656
SPAN_DESCRIPTION = "span.description"
5757
SPAN_STATUS = "span.status"
5858

59-
# Not all spans get a group assigned to it. Unassigned ones has a default of 0.
60-
UNCLASSIFIED_SPAN_GROUP = "00"
61-
6259

6360
class ThresholdDict(TypedDict):
6461
poor: float

Diff for: src/sentry/sentry_metrics/querying/samples_list.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
QueryBuilder,
1515
SpansIndexedQueryBuilder,
1616
)
17-
from sentry.search.events.constants import UNCLASSIFIED_SPAN_GROUP
1817
from sentry.search.events.types import ParamsType, QueryBuilderConfig, SelectType, SnubaParams
1918
from sentry.snuba.dataset import Dataset
2019
from sentry.snuba.metrics.naming_layer.mri import (
@@ -278,7 +277,7 @@ def get_matching_spans_from_traces(
278277

279278
return [
280279
SpanKey(
281-
group=UNCLASSIFIED_SPAN_GROUP,
280+
group="00", # all segments have a group of `00` currently
282281
timestamp=row["timestamp"],
283282
span_id=row["span_id"],
284283
)

0 commit comments

Comments
 (0)