Interface IEncryptionTelemetry
- Namespace
- Excalibur.Compliance
- Assembly
- Excalibur.Compliance.Abstractions.dll
Defines the contract for encryption-specific telemetry collection.
public interface IEncryptionTelemetry
Remarks
Provides OpenTelemetry-compatible metrics for core encryption operations including:
- Operation counters with algorithm and status tags
- Operation duration histograms by provider
- Key rotation counters
- Bytes processed counters
For detailed telemetry (health, migration, cache, key count), use
GetService(Type) with typeof(IEncryptionTelemetryDetails).
ISP Split: UpdateProviderHealth, RecordFieldsMigrated, RecordCacheAccess, and UpdateActiveKeyCount moved to IEncryptionTelemetryDetails to keep the core interface at or below 5 methods.
Implementations should use System.Diagnostics.Metrics for OpenTelemetry compatibility.
Properties
Meter
Gets the meter instance for encryption telemetry.
Meter Meter { get; }
Property Value
Methods
GetService(Type)
Gets a sub-interface or service from this telemetry provider.
object? GetService(Type serviceType)
Parameters
serviceTypeTypeThe type of service to retrieve (e.g.,
typeof(IEncryptionTelemetryDetails)).
Returns
RecordBytesProcessed(long, string, string)
Records encryption operation bytes processed.
void RecordBytesProcessed(long bytes, string operation, string provider)
Parameters
byteslongThe number of bytes processed.
operationstringThe operation type.
providerstringThe encryption provider name.
RecordKeyRotation(string, string)
Records a key rotation event.
void RecordKeyRotation(string provider, string rotationType)
Parameters
providerstringThe encryption provider name.
rotationTypestringThe type of rotation ("scheduled", "manual", "emergency").
RecordOperation(string, string, string, string)
Records an encryption operation.
void RecordOperation(string operation, string algorithm, string status, string provider)
Parameters
operationstringThe operation type (e.g., "Encrypt", "Decrypt").
algorithmstringThe encryption algorithm used (e.g., "AES-256-GCM").
statusstringThe operation status ("success" or "failure").
providerstringThe encryption provider name.
RecordOperationDuration(double, string, string)
Records the duration of an encryption operation.
void RecordOperationDuration(double durationMs, string operation, string provider)