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

result field in table panel of dashboard always named as count #5156

Open
ankitnayan opened this issue Jun 5, 2024 · 5 comments · Fixed by #5164
Open

result field in table panel of dashboard always named as count #5156

ankitnayan opened this issue Jun 5, 2024 · 5 comments · Fixed by #5164
Assignees
Labels
bug Something isn't working

Comments

@ankitnayan
Copy link
Collaborator

and if there is no result column, the table automatically adds a column called result filled with 0

@ankitnayan ankitnayan changed the title result field in table panel of dashboard always names as count result field in table panel of dashboard always named as count Jun 5, 2024
@ankitnayan ankitnayan added the bug Something isn't working label Jun 5, 2024
@srikanthccv
Copy link
Member

@vikrantgupta25 The legend format for the aggregation column is not respected. Please try this query and check.

SELECT now() as ts, 
stringTagMap['service.name'] AS `service.name`, 
toFloat64(avg(durationNano))/1000/1000 AS value
FROM signoz_traces.distributed_signoz_index_v2  
WHERE timestamp BETWEEN {{.start_datetime}} AND {{.end_datetime}}
GROUP BY (`service.name`, ts) order by (`service.name`, ts) ASC;

and if there is no result column, the table automatically adds a column called result filled with 0

@ankitnayan, the table column is usually viz for aggregation so it expects at least one aggregation result column. If there is no aggregation but just a plain list of values to read from somewhere, it should go in list panel type.

@ankitnayan
Copy link
Collaborator Author

It was this query

select traceID, round(sumIf(durationNano, stringTagMap['db.statement'] ilike '%test_api%')/1000/1000, 1) as db_time_ms, 
round(sumIf(durationNano, httpRoute ilike '%test_orders%')/1000/1000, 1) as route_time_ms
FROM signoz_traces.distributed_signoz_index_v2
WHERE (timestamp BETWEEN {{.start_datetime}} AND {{.end_datetime}})
AND (serviceName = 'sample-service')
GROUP BY traceID
HAVING route_time_ms != 0
ORDER BY db_time_ms DESC
LIMIT 10

@srikanthccv
Copy link
Member

This is the case of supporting multiple aggregations. Here the db_time_ms and route_time_ms are interpreted as labels so the result by default is 0.

@ankitnayan
Copy link
Collaborator Author

ankitnayan commented Jun 6, 2024

changing one of them to result still make the result column as count column. I mean there won't be any column with name result and there will always be a column named count

@vikrantgupta25
Copy link
Member

merged the frontend changes for the above issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants