fix(obs): add proxied PUT replication metrics (#3020)

fix(obs): add proxied put replication metrics
This commit is contained in:
安正超
2026-05-20 13:30:57 +08:00
committed by GitHub
parent 11054263c1
commit c684438625
3 changed files with 62 additions and 3 deletions
@@ -26,6 +26,9 @@ pub const TARGET_ARN_L: &str = "target_arn";
/// Replication range
pub const RANGE_L: &str = "range";
const PROXIED_PUT_REQUESTS_TOTAL: &str = "proxied_put_requests_total";
const PROXIED_PUT_REQUESTS_FAILURES: &str = "proxied_put_requests_failures";
pub static BUCKET_REPL_LAST_HR_FAILED_BYTES_MD: LazyLock<MetricDescriptor> = LazyLock::new(|| {
new_gauge_md(
MetricName::LastHourFailedBytes,
@@ -143,6 +146,24 @@ pub static BUCKET_REPL_PROXIED_PUT_TAGGING_REQUESTS_FAILURES_MD: LazyLock<Metric
)
});
pub static BUCKET_REPL_PROXIED_PUT_REQUESTS_FAILURES_MD: LazyLock<MetricDescriptor> = LazyLock::new(|| {
new_counter_md(
MetricName::from(PROXIED_PUT_REQUESTS_FAILURES),
"Number of failures in PUT requests proxied to replication target",
&[BUCKET_L],
subsystems::BUCKET_REPLICATION,
)
});
pub static BUCKET_REPL_PROXIED_PUT_REQUESTS_TOTAL_MD: LazyLock<MetricDescriptor> = LazyLock::new(|| {
new_counter_md(
MetricName::from(PROXIED_PUT_REQUESTS_TOTAL),
"Number of PUT requests proxied to replication target",
&[BUCKET_L],
subsystems::BUCKET_REPLICATION,
)
});
pub static BUCKET_REPL_PROXIED_PUT_TAGGING_REQUESTS_TOTAL_MD: LazyLock<MetricDescriptor> = LazyLock::new(|| {
new_counter_md(
MetricName::ProxiedPutTaggingRequestsTotal,