Table of Contents

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

Meter

Methods

RecordEncryptionLatency(double, string, string, bool)

Records encryption operation latency.

void RecordEncryptionLatency(double durationMs, string operation, string provider, bool success)

Parameters

durationMs double

The duration in milliseconds.

operation string

The operation type (e.g., "Encrypt", "Decrypt").

provider string

The KMS provider name.

success bool

Whether the operation succeeded.

RecordEncryptionOperation(string, string, long)

Records an encryption operation.

void RecordEncryptionOperation(string operation, string provider, long sizeBytes)

Parameters

operation string

The operation type (e.g., "Encrypt", "Decrypt").

provider string

The KMS provider name.

sizeBytes long

The size of the data processed in bytes.

RecordKeyRotation(string, string)

Records a successful key rotation.

void RecordKeyRotation(string keyId, string provider)

Parameters

keyId string

The identifier of the rotated key.

provider string

The 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)

Parameters

keyId string

The identifier of the key that failed to rotate.

provider string

The KMS provider name.

errorType string

The type of error that occurred.