-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NETOBSERV-740: Metrics integration - console plugin frontend (#516)
* Add prom client vendor * NETOBSERV-739: Add prometheus queries This introduces prometheus as a new datasource, that can be used either as a replacement or as a complement of Loki. It doesn't require to change the frontend/backend API interface: on every frontend query, backend checks if that query is transposable to prometheus, and if so, runs it on prometheus, else falls back on loki (if it's enabled) There's some refactoring of the config and topology handlers to make place for prometheus. * Manage DnsFlagsResponseCode * Use explicit metrics defs; better error message * Use explicit metrics config; handle prom labels values * return datasources in query result * add datasource param & fix tests * remove disabled check * manage datasources * hide filters not available * Detect available filters without new config To this by probing with the existing filter encoder function * Do not show invalid groups Also, merge all "allowXXX" scope props into a single "allowedScopes" prop * fix front lint * Fix tab tooltip not showing * run prettier * Fix main remaining issues for prom datasource (backend) - Manage FlowDirection: first check if query can be performed using a metric agnostic to direction (Any); else, check both Ingress and Egress metric, and combine them in promQL with OR - Handle "getNamesForPrefix" with prom - Split "getTopologyFlows" in 2 parts for cyclo cplx - Improve error messages when query can't be performed using prometheus - Add tests * Do not show prom-unsupported as a Loki error * Fixes & address feedback - Consider known metrics labels when fetching label values from prom (else use Loki when possible, or raise error) - Avoid aggregate on app with prom - Fix issue when direction is unset in metrics defs - Fix datasources stats not merged on multiple queries - Add tests * Adding unit test on groups filtering * Add prom measurement metric * NETOBSERV-1652: retry with Loki on prom 401/403 * Fix percentile queries, metric name has no suffix In a previous implementation, metric names came with their "_bucket" prefix for histograms; now this isn't the case anymore but the query generation wasn't updated accordingly --------- Co-authored-by: Joel Takvorian <[email protected]>
- Loading branch information
1 parent
4579f42
commit fade3b6
Showing
103 changed files
with
9,679 additions
and
791 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.