Skip to content
Open
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
12 changes: 1 addition & 11 deletions crates/adapters/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ use feldera_types::format::json::JsonEncoderConfig;
use feldera_types::pipeline_diff::PipelineDiff;
use feldera_types::query_params::{
ActivateParams, ApproveParameters, MetricsFormat, MetricsParameters, SamplyProfileGetParams,
SamplyProfileParams,
SamplyProfileParams, StatsParams,
};
use feldera_types::runtime_status::{
BootstrapConfig, BootstrapPolicy, ConnectorStats, ExtendedRuntimeStatus,
Expand Down Expand Up @@ -1737,16 +1737,6 @@ async fn query(
}
}

#[derive(Debug, Default, Deserialize)]
struct StatsParams {
/// When `true`, include the most recent error messages for each endpoint
/// in the response (up to `MAX_CONNECTOR_ERRORS` per list). Default is
/// `false` so that callers polling `/stats` keep getting a lightweight
/// response. This selector is intended for the support-bundle collector.
#[serde(default)]
include_connector_errors: bool,
}

#[get("/stats")]
async fn stats(
state: WebData<ServerState>,
Expand Down
11 changes: 11 additions & 0 deletions crates/feldera-types/src/query_params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,14 @@ pub struct ApproveParameters {
#[serde(default)]
pub concurrent_bootstrap: bool,
}

/// Query parameters to the `/stats` endpoint.
#[derive(Debug, Default, Deserialize, Serialize)]
pub struct StatsParams {
/// When `true`, include the most recent error messages for each endpoint
/// in the response (up to `MAX_CONNECTOR_ERRORS` per list). Default is
/// `false` so that callers polling `/stats` keep getting a lightweight
/// response. This selector is intended for the support-bundle collector.
#[serde(default)]
pub include_connector_errors: bool,
}
Loading