"System: None" always on Backend / Queries / Query Summary Page
Environment
self-hosted (https://develop.sentry.dev/self-hosted/)
Steps to Reproduce
- Use metric/tracing on Laravel Project
- Observe on the queries summaries page, System dropdown can never actually can be picked
Expected Result
- At least from existing result (whatever the
db.system/span.systemis, or show only otel compliant naming), it show on the dropdown
Actual Result
- It didnt show
I suspect its from this line
https://github.com/getsentry/sentry/blob/27e83df18e5bfbabb1d13746683df81b223b54c2/static/app/views/insights/database/components/useSystemSelectorOptions.tsx#L17-L25
that i suspect correspond to this request query
.../events/?dataset=spans&field=span.system&field=count%28%29&per_page=50&project=49&query=span.op%3Adb&referrer=api.insights.database-system-selector&sampling=NORMAL&sort=-count%28%29&statsPeriod=24h
that I suspect, correspond to this clickhouse query
SELECT
IF(
mapContains(attributes_string_6, 'db.system'),
arrayElement(attributes_string_6, 'db.system'),
NULL
) AS "db.system_TYPE_STRING",
ROUND(
sumIfOrNull(
1 / sampling_factor,
isNotNull(CAST(project_id, 'Int64')) AND true
)
) AS "count()",
multiply(
1.96,
sqrt(
sumIf(
minus(
multiply(1 / sampling_factor, 1 / sampling_factor),
1 / sampling_factor
),
isNotNull("sentry.project_id_TYPE_INT") AND true
)
)
) AS "__snuba_custom_column__confidence_interval$count()$function_type:count",
divide(
countIf("sentry.project_id_TYPE_INT", isNotNull("sentry.project_id_TYPE_INT") AND true),
sumIf(1 / sampling_factor, isNotNull("sentry.project_id_TYPE_INT") AND true)
) AS "__snuba_custom_column__average_sample_rate$count()",
countIf("sentry.project_id_TYPE_INT", isNotNull("sentry.project_id_TYPE_INT") AND true)
AS "__snuba_custom_column__count$count()"
FROM eap_items_1_dist
WHERE
in(project_id, [50])
AND organization_id = 4509551426732032
AND timestamp < toDateTime('2025-12-08 10:59:52')
AND timestamp >= toDateTime('2025-12-08 04:58:52')
AND (
IF(
mapContains(attributes_string_19, 'sentry.op'),
arrayElement(attributes_string_19, 'sentry.op'),
NULL
) = 'db'
OR (
isNull("sentry.op_TYPE_STRING")
AND isNull('db')
)
)
AND isNotNull("sentry.project_id_TYPE_INT")
AND item_type = 1
GROUP BY "db.system_TYPE_STRING"
ORDER BY "count()" DESC
LIMIT 52 OFFSET 0;
This is what is shown
with span.op like this
it show that span.op is db.sql.query on other project its db.transaction
I think the correct approach is to use span.category not span.op for the fiilter.
I also try to brute force it, change span.op to db in the clickhouse, and change the span.system to something sentry recognize (laravel sdk also wrong to send, https://github.com/getsentry/sentry-laravel/issues/1075 ) (but for some reason microsoft.sql_server as defined by otel spec is not recognized too, maybe because its not supported yet ? static/app/views/insights/database/utils/constants.tsx)
and now it shows the dropdown correctly
Product Area
Insights
Link
No response
DSN
No response
Version
No response
Assigning to @getsentry/support for routing ⏲️
Other issues i encounter is when I brute force it, and I pick one of the system, it correctly show on the project, but It still carry on to other project, meaning the query to get the data on that page is appended by span.system= queries, with no mean of changing it, as you see here
Routing to @getsentry/product-owners-performance for triage ⏲️
@fmiqbal we're in the process of reworking and cleaning up the span attributes that are used to power this page, we'll look at your problem as part of this.