Table of Contents

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

Meter

Methods

GetService(Type)

Gets a sub-interface or service from this telemetry provider.

object? GetService(Type serviceType)

Parameters

serviceType Type

The type of service to retrieve (e.g., typeof(IEncryptionTelemetryDetails)).

Returns

object

The service instance, or null if not supported.

RecordBytesProcessed(long, string, string)

Records encryption operation bytes processed.

void RecordBytesProcessed(long bytes, string operation, string provider)

Parameters

bytes long

The number of bytes processed.

operation string

The operation type.

provider string

The encryption provider name.

RecordKeyRotation(string, string)

Records a key rotation event.

void RecordKeyRotation(string provider, string rotationType)

Parameters

provider string

The encryption provider name.

rotationType string

The 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

operation string

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

algorithm string

The encryption algorithm used (e.g., "AES-256-GCM").

status string

The operation status ("success" or "failure").

provider string

The encryption provider name.

RecordOperationDuration(double, string, string)

Records the duration of an encryption operation.

void RecordOperationDuration(double durationMs, string operation, string provider)

Parameters

durationMs double

The duration in milliseconds.

operation string

The operation type.

provider string

The encryption provider name.