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

Fix: Update Duration value in example traces dashboard #983

Merged
merged 4 commits into from
Sep 12, 2024

Conversation

aangelisc
Copy link
Contributor

Similar to #966 the duration displayed will now be the maximum value. I'm also explicitly using the divide function for readability.

Copy link

github-actions bot commented Sep 12, 2024

Use the following command to run this PR with Docker at http://localhost:3000:

docker run --rm -p 3000:3000 grafana/plugin-builds:8e5b46cb1ec52934ce31bfdabfd0ff8af721023bpre

alyssabull
alyssabull previously approved these changes Sep 12, 2024
alyssabull
alyssabull previously approved these changes Sep 12, 2024
@aangelisc aangelisc merged commit e5d1feb into main Sep 12, 2024
16 checks passed
@SpencerTorres
Copy link
Collaborator

@aangelisc
Copy link
Contributor Author

Just a note, division may not be the best operator here:

Issue: #720 Related code: https://github.com/ClickHouse/clickhouse-grafana-datasource/blob/280af29668f9977e9d4e779c033c4a297589905c/src/data/sqlGenerator.ts#L561-L575

That's interesting @SpencerTorres, thank you for picking up on that. Would you suggest truncating the data to millisecond precision instead?

@SpencerTorres
Copy link
Collaborator

I suppose it depends on how it's displayed, I want to avoid rounding to 0 and having that affect filtering

@aangelisc
Copy link
Contributor Author

I see, my understanding of the ClickHouse documentation is that divide should always yield a float value (and I've tested this on ClickHouse play with an integer value for the duration). I believe this should be fine but we can switch to multiply instead if you'd prefer to be cautious. Let me know what you think!

image

@SpencerTorres
Copy link
Collaborator

I see the problem, I was previously using intDivOrZero, which is much different...

Either one works then, should be fine as long as it preserves the float value 👍

Thanks!

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