mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 00:49:42 +08:00
build(deps): bump opentelemetry crates to 0.27 (#6774)
This commit is contained in:
@ -63,7 +63,7 @@ impl AwsKmsClient {
|
||||
// Logging using `Debug` representation of the error as the `Display`
|
||||
// representation does not hold sufficient information.
|
||||
logger::error!(aws_kms_sdk_error=?error, "Failed to AWS KMS decrypt data");
|
||||
metrics::AWS_KMS_DECRYPTION_FAILURES.add(&metrics::CONTEXT, 1, &[]);
|
||||
metrics::AWS_KMS_DECRYPTION_FAILURES.add(1, &[]);
|
||||
})
|
||||
.change_context(AwsKmsError::DecryptionFailed)?;
|
||||
|
||||
@ -75,7 +75,7 @@ impl AwsKmsClient {
|
||||
})?;
|
||||
|
||||
let time_taken = start.elapsed();
|
||||
metrics::AWS_KMS_DECRYPT_TIME.record(&metrics::CONTEXT, time_taken.as_secs_f64(), &[]);
|
||||
metrics::AWS_KMS_DECRYPT_TIME.record(time_taken.as_secs_f64(), &[]);
|
||||
|
||||
Ok(output)
|
||||
}
|
||||
@ -99,7 +99,7 @@ impl AwsKmsClient {
|
||||
// Logging using `Debug` representation of the error as the `Display`
|
||||
// representation does not hold sufficient information.
|
||||
logger::error!(aws_kms_sdk_error=?error, "Failed to AWS KMS encrypt data");
|
||||
metrics::AWS_KMS_ENCRYPTION_FAILURES.add(&metrics::CONTEXT, 1, &[]);
|
||||
metrics::AWS_KMS_ENCRYPTION_FAILURES.add(1, &[]);
|
||||
})
|
||||
.change_context(AwsKmsError::EncryptionFailed)?;
|
||||
|
||||
@ -108,7 +108,7 @@ impl AwsKmsClient {
|
||||
.ok_or(AwsKmsError::MissingCiphertextEncryptionOutput)
|
||||
.map(|blob| consts::BASE64_ENGINE.encode(blob.into_inner()))?;
|
||||
let time_taken = start.elapsed();
|
||||
metrics::AWS_KMS_ENCRYPT_TIME.record(&metrics::CONTEXT, time_taken.as_secs_f64(), &[]);
|
||||
metrics::AWS_KMS_ENCRYPT_TIME.record(time_taken.as_secs_f64(), &[]);
|
||||
|
||||
Ok(output)
|
||||
}
|
||||
|
||||
@ -30,9 +30,8 @@ pub mod consts {
|
||||
/// Metrics for interactions with external systems.
|
||||
#[cfg(feature = "aws_kms")]
|
||||
pub mod metrics {
|
||||
use router_env::{counter_metric, global_meter, histogram_metric, metrics_context};
|
||||
use router_env::{counter_metric, global_meter, histogram_metric_f64};
|
||||
|
||||
metrics_context!(CONTEXT);
|
||||
global_meter!(GLOBAL_METER, "EXTERNAL_SERVICES");
|
||||
|
||||
#[cfg(feature = "aws_kms")]
|
||||
@ -41,7 +40,7 @@ pub mod metrics {
|
||||
counter_metric!(AWS_KMS_ENCRYPTION_FAILURES, GLOBAL_METER); // No. of AWS KMS Encryption failures
|
||||
|
||||
#[cfg(feature = "aws_kms")]
|
||||
histogram_metric!(AWS_KMS_DECRYPT_TIME, GLOBAL_METER); // Histogram for AWS KMS decryption time (in sec)
|
||||
histogram_metric_f64!(AWS_KMS_DECRYPT_TIME, GLOBAL_METER); // Histogram for AWS KMS decryption time (in sec)
|
||||
#[cfg(feature = "aws_kms")]
|
||||
histogram_metric!(AWS_KMS_ENCRYPT_TIME, GLOBAL_METER); // Histogram for AWS KMS encryption time (in sec)
|
||||
histogram_metric_f64!(AWS_KMS_ENCRYPT_TIME, GLOBAL_METER); // Histogram for AWS KMS encryption time (in sec)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user