Repository navigation
Metrics query support - #1189
Open
thomascorthals wants to merge 4 commits into
Open
thomascorthals wants to merge 4 commits into
thomascorthals wants to merge 4 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1189 +/- ##
==========================================
- Coverage 98.42% 98.40% -0.02%
==========================================
Files 403 406 +3
Lines 10659 10676 +17
==========================================
+ Hits 10491 10506 +15
- Misses 168 170 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #669.
I've modelled this on Solr 10 which overhauled the query parameters for Metrics queries. It also did away with the JSON response format and introduced OpenMetrics 1.0 alongside the now default Prometheus format. To parse this response into an object, I've suggested butschster/prometheus-parser. Without this library, it's still possible to get the raw output as shown in the examples.
For older Solr versions, you can explicitly set
WT_JSONon the query and get the ouput as an array, but not asResultobject. This is also shown in the examples.As a side quest, I've added
Utility::stringOrArrayToArray()because I found myself repeating the same code for methods that take'one, two'or['one', 'two']as equivalent ways of passing the same options.