Table of Contents

Class GovernanceTelemetryProjection

Namespace
ReferenceApplication.Web.Governance
Assembly
ReferenceApplication.Web.dll

Projects persisted governance evidence onto the host's telemetry through AsiBackbone's governance emitter.

public sealed class GovernanceTelemetryProjection
Inheritance
GovernanceTelemetryProjection
Inherited Members

Remarks

The AsiBackbone audit ledger and lifecycle store remain the record of governance; telemetry is a projection of it. LedgerDecisionReceiptSink projects a decision only after its receipt is appended, and AsiBackboneAuditCompletionPublisher projects a lifecycle event only after it is appended, so nothing reaches telemetry that the ledger does not hold. A projection is best effort: it never throws, is never cancelled by the governed request, and cannot change a governance outcome. When the host registers no AsiBackbone.Core.Emissions.IGovernanceEmitter, as when OpenTelemetry or governance instrumentation is disabled, projection does nothing.

Envelopes are built field by field, so only identifiers, policy identity, the operation name, the outcome, and the decision or lifecycle stage leave the process. The actor, reason codes, receipt and lifecycle metadata (including mutation batch identifiers and manifest hashes), request bodies, and mutation values are never projected, whatever emitter is registered.

Constructors

GovernanceTelemetryProjection(ILogger<GovernanceTelemetryProjection>, IGovernanceEmitter?)

Initializes a new instance of the GovernanceTelemetryProjection class.

public GovernanceTelemetryProjection(ILogger<GovernanceTelemetryProjection> logger, IGovernanceEmitter? emitter = null)

Parameters

logger ILogger<GovernanceTelemetryProjection>

The logger used when a projection is not delivered.

emitter IGovernanceEmitter

The governance emitter, or null when governance telemetry is off.

Properties

Disabled

Gets a projection that does nothing, for hosts and tests without governance telemetry.

public static GovernanceTelemetryProjection Disabled { get; }

Property Value

GovernanceTelemetryProjection

IsEnabled

Gets a value indicating whether evidence is projected.

public bool IsEnabled { get; }

Property Value

bool

Methods

ProjectDecisionAsync(IDecisionReceipt)

Projects a decision whose receipt has been appended to the audit ledger.

public ValueTask ProjectDecisionAsync(IDecisionReceipt receipt)

Parameters

receipt IDecisionReceipt

The persisted decision receipt.

Returns

ValueTask

A task that completes when the projection has been attempted.

ProjectLifecycleEventAsync(DecisionReceiptLifecycleEvent)

Projects a lifecycle event that has been appended to the lifecycle store.

public ValueTask ProjectLifecycleEventAsync(DecisionReceiptLifecycleEvent lifecycleEvent)

Parameters

lifecycleEvent DecisionReceiptLifecycleEvent

The persisted lifecycle event.

Returns

ValueTask

A task that completes when the projection has been attempted.