v0.2.1-pre.005-fix.001
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// file: crates/ksp-onchain-transport-lib/src/pool.rs
|
||||
// version: 4
|
||||
// version: 5
|
||||
|
||||
/// Safe snapshot of the logical HTTP endpoint pool.
|
||||
#[derive(Clone, Debug, Eq, PartialEq)]
|
||||
@@ -105,7 +105,7 @@ impl HttpRequestPermit {
|
||||
pub fn record_success(&self) {
|
||||
self.role_runtime.record_success();
|
||||
ksp_logging_lib::trace!(
|
||||
target: env!("CARGO_PKG_NAME"),
|
||||
target: crate::TRACING_TARGET,
|
||||
endpoint_name = self.selection.endpoint_name(),
|
||||
role = self.selection.role().as_str(),
|
||||
request_kind = self.selection.request_kind().as_str(),
|
||||
@@ -118,7 +118,7 @@ impl HttpRequestPermit {
|
||||
pub fn record_failure(&self) {
|
||||
self.role_runtime.record_failure();
|
||||
ksp_logging_lib::warn!(
|
||||
target: env!("CARGO_PKG_NAME"),
|
||||
target: crate::TRACING_TARGET,
|
||||
endpoint_name = self.selection.endpoint_name(),
|
||||
provider = self.selection.client().provider().as_str(),
|
||||
cluster = self.selection.client().cluster().as_str(),
|
||||
@@ -136,7 +136,7 @@ impl HttpRequestPermit {
|
||||
let pause = self.role_runtime.record_rate_limited(provider_retry_after);
|
||||
let cooldown_ms = duration_millis_u64(pause);
|
||||
ksp_logging_lib::warn!(
|
||||
target: env!("CARGO_PKG_NAME"),
|
||||
target: crate::TRACING_TARGET,
|
||||
endpoint_name = self.selection.endpoint_name(),
|
||||
provider = self.selection.client().provider().as_str(),
|
||||
cluster = self.selection.client().cluster().as_str(),
|
||||
@@ -200,7 +200,7 @@ impl HttpTransportPool {
|
||||
}),
|
||||
};
|
||||
ksp_logging_lib::debug!(
|
||||
target: env!("CARGO_PKG_NAME"),
|
||||
target: crate::TRACING_TARGET,
|
||||
endpoint_count = pool.inner.clients.len(),
|
||||
available_endpoint_count = pool.snapshot().available_endpoint_count(),
|
||||
max_retries = pool.inner.retry.max_retries(),
|
||||
@@ -376,7 +376,7 @@ impl HttpTransportPool {
|
||||
std::result::Result::Err(_) => return RuntimeSelectionAttempt::Unavailable,
|
||||
};
|
||||
ksp_logging_lib::debug!(
|
||||
target: env!("CARGO_PKG_NAME"),
|
||||
target: crate::TRACING_TARGET,
|
||||
endpoint_name = selection.endpoint_name(),
|
||||
role = role.as_str(),
|
||||
request_kind = request_kind.as_str(),
|
||||
@@ -491,7 +491,7 @@ impl HttpTransportPool {
|
||||
std::option::Option::None => return selection_failed(role, request_kind),
|
||||
};
|
||||
ksp_logging_lib::debug!(
|
||||
target: env!("CARGO_PKG_NAME"),
|
||||
target: crate::TRACING_TARGET,
|
||||
endpoint_name = client.name(),
|
||||
role = role.as_str(),
|
||||
request_kind = request_kind.as_str(),
|
||||
@@ -601,7 +601,7 @@ fn selection_error(role: &crate::HttpRoleName, request_kind: &crate::HttpRequest
|
||||
|
||||
fn request_timeout(role: &crate::HttpRoleName, request_kind: &crate::HttpRequestKind, message: &str) -> ksp_core_lib::Result<crate::HttpRequestPermit> {
|
||||
ksp_logging_lib::warn!(
|
||||
target: env!("CARGO_PKG_NAME"),
|
||||
target: crate::TRACING_TARGET,
|
||||
role = role.as_str(),
|
||||
request_kind = request_kind.as_str(),
|
||||
"HTTP request admission deadline expired"
|
||||
|
||||
Reference in New Issue
Block a user