aKode fase 5: rinomina interna (crate akode-*, akode-rs/, akode-cli/, binario akode, AKODE_*, ~/.akode, snapshot)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
andrea.difonzo
2026-11-11 11:06:46 +01:00
parent df99318392
commit 86e7c72e5f
10383 changed files with 749164 additions and 749170 deletions

View File

@@ -0,0 +1,23 @@
//! Caller-side RPC attempt counts using the client's protocol method names, independent of tracing.
use akode_otel::EXEC_SERVER_CLIENT_REQUEST_COUNT_METRIC;
use akode_otel::MetricsClient;
pub(crate) fn record_client_request(metrics: Option<&MetricsClient>, method: &str) {
let Some(metrics) = metrics else {
return;
};
// Record before local admission so failures and cancelled calls still count
// as attempts. Notifications and responses never enter these call paths.
if metrics
.counter_with_description(
EXEC_SERVER_CLIENT_REQUEST_COUNT_METRIC,
"Total number of client-side exec-server RPC attempts, including local failures.",
/*inc*/ 1,
&[("method", method)],
)
.is_err()
{
tracing::warn!("failed to emit exec-server client request counter");
}
}