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

feat: add cluster/metrics endpoint #717

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ serde_repr = "0.1.17"
hashlru = { version = "0.11.0", features = ["serde"] }
path-clean = "1.0.1"
prost = "0.12.3"
prometheus-parse = "0.2.5"

[build-dependencies]
cargo_toml = "0.15"
Expand Down
7 changes: 4 additions & 3 deletions server/src/handlers/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ use actix_cors::Cors;
use arrow_schema::Schema;
use serde_json::Value;

use self::{modal::query_server::QueryServer, query::Query};
use self::{cluster::get_ingester_info, query::Query};

pub(crate) mod about;
pub mod cluster;
pub(crate) mod health_check;
pub(crate) mod ingest;
mod kinesis;
Expand Down Expand Up @@ -62,7 +63,7 @@ pub fn base_path_without_preceding_slash() -> String {

pub async fn fetch_schema(stream_name: &str) -> anyhow::Result<arrow_schema::Schema> {
let mut res = vec![];
let ima = QueryServer::get_ingester_info().await.unwrap();
let ima = get_ingester_info().await.unwrap();

for im in ima {
let uri = format!(
Expand Down Expand Up @@ -92,7 +93,7 @@ pub async fn fetch_schema(stream_name: &str) -> anyhow::Result<arrow_schema::Sch
pub async fn send_query_request_to_ingester(query: &Query) -> anyhow::Result<Vec<Value>> {
// send the query request to the ingester
let mut res = vec![];
let ima = QueryServer::get_ingester_info().await.unwrap();
let ima = get_ingester_info().await.unwrap();

for im in ima.iter() {
let uri = format!(
Expand Down
Loading
Loading