Interface IComplianceMetrics
- Namespace
- Excalibur.Compliance
- Assembly
- Excalibur.Compliance.Abstractions.dll
Defines the contract for compliance metrics collection.
public interface IComplianceMetrics
- Extension Methods
Remarks
Provides OpenTelemetry-based metrics for compliance features including:
- Key rotation tracking and failures
- Encryption operation latency and throughput
- Audit event logging statistics
- Key expiration monitoring
Properties
Meter
Gets the meter instance for compliance metrics.
Meter Meter { get; }
Property Value
Methods
RecordEncryptionLatency(double, string, string, bool)
Records encryption operation latency.
void RecordEncryptionLatency(double durationMs, string operation, string provider, bool success)
Parameters
durationMsdoubleThe duration in milliseconds.
operationstringThe operation type (e.g., "Encrypt", "Decrypt").
providerstringThe KMS provider name.
successboolWhether the operation succeeded.
RecordEncryptionOperation(string, string, long)
Records an encryption operation.
void RecordEncryptionOperation(string operation, string provider, long sizeBytes)
Parameters
operationstringThe operation type (e.g., "Encrypt", "Decrypt").
providerstringThe KMS provider name.
sizeByteslongThe size of the data processed in bytes.
RecordKeyRotation(string, string)
Records a successful key rotation.
void RecordKeyRotation(string keyId, string provider)
Parameters
keyIdstringThe identifier of the rotated key.
providerstringThe KMS provider name (e.g., "AzureKeyVault", "HashiCorpVault").
RecordKeyRotationFailure(string, string, string)
Records a failed key rotation attempt.
void RecordKeyRotationFailure(string keyId, string provider, string errorType)