-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
feat: table view support for cumulative & delta metrics #3110
Conversation
Will take some time to read about cumulative and delta metrics and then review this. |
Appreciate it. I have written a descriptive comment here to explain the difference #2505. I will do the same with little more details and queries to help understand changes better. |
I updated the PR description with an example to show what is the underlying table structure and how is a final value calculated and how does it relate to the query written. |
Please find some time to review. Let me know if there is something I can help understand any part better or could improve. |
Will review today |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for explaining the concept, looks good to me.
Part of #2842
Attempts at showing what happens with an example. I will be happy to answer any questions or explain in more detail.
signoz_metrics.samples_v2
signoz_metrics.time_series_v2
Assume you wanted a request rate for the service frontend.
Here is what we would do for the delta. We join the both the table on the id and then on the result we use sum(value)/duration to get the rate.
Here is the intermediary result of the join.
For delta we would sum the value column group by the service_name:
For cumulative we would would first need to calculate the rate of change for each series and then sum them up.
Now we sum the runningRate column and divide by the duration.