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
upstream metrics query improvements from grafana #6051
Labels
Comments
sanderr
added
enhancement
New feature or request
usability
This ticket is related to improved usability
labels
May 26, 2023
This was referenced Aug 16, 2023
inmantaci
pushed a commit
that referenced
this issue
Aug 25, 2023
…mestamps to a full hour. (Issue #6051, PR #6396) # Description This PR adds support to the `GET /metrics` endpoint to round the returned timestamps to the previous hour closes #6051 # Self Check: - [x] Attached issue to pull request - [x] Changelog entry - [x] Type annotations are present - [x] Code is clear and sufficiently documented - [x] No (preventable) type errors (check using make mypy or make mypy-diff) - [x] Sufficient test cases (reproduces the bug/tests the requested feature) - [x] Correct, in line with design - [ ] ~~End user documentation is included or an issue is created for end-user documentation~~ - [ ] ~~If this PR fixes a race condition in the test suite, also push the fix to the relevant stable branche(s) (see [test-fixes](https://internal.inmanta.com/development/core/tasks/build-master.html#test-fixes) for more info)~~
9 tasks
inmantaci
pushed a commit
that referenced
this issue
Aug 29, 2023
…ult timestamp. (Issue #6051, PR #6439) # Description The timestamp inputs provided to the `test_get_environment_metrics_api_endpoint_round_timestamp` test case were using the default timezone of the machine the test case was executed on. As such, the test case used different inputs depending on the timezone it was executed on. This caused the test case when executing in the UTC timezone. This PR fixes that issue by using fixed inputs. Belongs to #6051 # Self Check: - [x] Attached issue to pull request - [x] Changelog entry - [x] Type annotations are present - [x] Code is clear and sufficiently documented - [x] No (preventable) type errors (check using make mypy or make mypy-diff) - [x] Sufficient test cases (reproduces the bug/tests the requested feature) - [x] Correct, in line with design - [ ] ~~End user documentation is included or an issue is created for end-user documentation~~ - [ ] ~~If this PR fixes a race condition in the test suite, also push the fix to the relevant stable branche(s) (see [test-fixes](https://internal.inmanta.com/development/core/tasks/build-master.html#test-fixes) for more info)~~
inmantaci
pushed a commit
that referenced
this issue
Aug 29, 2023
…ult timestamp. (Issue #6051, PR #6439) # Description The timestamp inputs provided to the `test_get_environment_metrics_api_endpoint_round_timestamp` test case were using the default timezone of the machine the test case was executed on. As such, the test case used different inputs depending on the timezone it was executed on. This caused the test case when executing in the UTC timezone. This PR fixes that issue by using fixed inputs. Belongs to #6051 # Self Check: - [x] Attached issue to pull request - [x] Changelog entry - [x] Type annotations are present - [x] Code is clear and sufficiently documented - [x] No (preventable) type errors (check using make mypy or make mypy-diff) - [x] Sufficient test cases (reproduces the bug/tests the requested feature) - [x] Correct, in line with design - [ ] ~~End user documentation is included or an issue is created for end-user documentation~~ - [ ] ~~If this PR fixes a race condition in the test suite, also push the fix to the relevant stable branche(s) (see [test-fixes](https://internal.inmanta.com/development/core/tasks/build-master.html#test-fixes) for more info)~~
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
$__timeGroup
macro is expanded to a bucket value similar to our own but rounding down to the nearest timestamp that is divisible by the interval width, ensuring more readable boundaries.AVG
instead ofsum(count)::float)/(count(*)::float
generate_series
subquery and the subsequent join. We may want to delegate this checkbox to some time in the future when we have better insights in how useful the sliding window is.The text was updated successfully, but these errors were encountered: