up
Some checks failed
Docs CI / lint-and-preview (push) Has been cancelled
Signals CI & Image / signals-ci (push) Has been cancelled
Signals Reachability Scoring & Events / reachability-smoke (push) Has been cancelled
Signals Reachability Scoring & Events / sign-and-upload (push) Has been cancelled
AOC Guard CI / aoc-guard (push) Has been cancelled
AOC Guard CI / aoc-verify (push) Has been cancelled
Reachability Corpus Validation / validate-corpus (push) Has been cancelled
Reachability Corpus Validation / validate-ground-truths (push) Has been cancelled
Scanner Analyzers / Discover Analyzers (push) Has been cancelled
Scanner Analyzers / Validate Test Fixtures (push) Has been cancelled
Reachability Corpus Validation / determinism-check (push) Has been cancelled
Scanner Analyzers / Build Analyzers (push) Has been cancelled
Scanner Analyzers / Test Language Analyzers (push) Has been cancelled
Scanner Analyzers / Verify Deterministic Output (push) Has been cancelled
Notify Smoke Test / Notify Unit Tests (push) Has been cancelled
Notify Smoke Test / Notifier Service Tests (push) Has been cancelled
Notify Smoke Test / Notification Smoke Test (push) Has been cancelled
Policy Lint & Smoke / policy-lint (push) Has been cancelled
Some checks failed
Docs CI / lint-and-preview (push) Has been cancelled
Signals CI & Image / signals-ci (push) Has been cancelled
Signals Reachability Scoring & Events / reachability-smoke (push) Has been cancelled
Signals Reachability Scoring & Events / sign-and-upload (push) Has been cancelled
AOC Guard CI / aoc-guard (push) Has been cancelled
AOC Guard CI / aoc-verify (push) Has been cancelled
Reachability Corpus Validation / validate-corpus (push) Has been cancelled
Reachability Corpus Validation / validate-ground-truths (push) Has been cancelled
Scanner Analyzers / Discover Analyzers (push) Has been cancelled
Scanner Analyzers / Validate Test Fixtures (push) Has been cancelled
Reachability Corpus Validation / determinism-check (push) Has been cancelled
Scanner Analyzers / Build Analyzers (push) Has been cancelled
Scanner Analyzers / Test Language Analyzers (push) Has been cancelled
Scanner Analyzers / Verify Deterministic Output (push) Has been cancelled
Notify Smoke Test / Notify Unit Tests (push) Has been cancelled
Notify Smoke Test / Notifier Service Tests (push) Has been cancelled
Notify Smoke Test / Notification Smoke Test (push) Has been cancelled
Policy Lint & Smoke / policy-lint (push) Has been cancelled
This commit is contained in:
@@ -476,6 +476,56 @@ public static class PolicyEngineTelemetry
|
||||
|
||||
#endregion
|
||||
|
||||
#region VEX Decision Metrics
|
||||
|
||||
// Counter: policy_vex_decisions_total{status,lattice_state}
|
||||
private static readonly Counter<long> VexDecisionsCounter =
|
||||
Meter.CreateCounter<long>(
|
||||
"policy_vex_decisions_total",
|
||||
unit: "decisions",
|
||||
description: "Total VEX decisions emitted by status and lattice state.");
|
||||
|
||||
// Counter: policy_vex_signing_total{success,rekor_submitted}
|
||||
private static readonly Counter<long> VexSigningCounter =
|
||||
Meter.CreateCounter<long>(
|
||||
"policy_vex_signing_total",
|
||||
unit: "signings",
|
||||
description: "Total VEX decision signing operations.");
|
||||
|
||||
/// <summary>
|
||||
/// Records a VEX decision emission.
|
||||
/// </summary>
|
||||
/// <param name="status">VEX status (not_affected, affected, under_investigation, fixed).</param>
|
||||
/// <param name="latticeState">Lattice state code (U, SR, SU, RO, RU, CR, CU, X).</param>
|
||||
public static void RecordVexDecision(string status, string latticeState)
|
||||
{
|
||||
var tags = new TagList
|
||||
{
|
||||
{ "status", NormalizeTag(status) },
|
||||
{ "lattice_state", NormalizeTag(latticeState) },
|
||||
};
|
||||
|
||||
VexDecisionsCounter.Add(1, tags);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Records a VEX signing operation.
|
||||
/// </summary>
|
||||
/// <param name="success">Whether the signing operation succeeded.</param>
|
||||
/// <param name="rekorSubmitted">Whether the envelope was submitted to Rekor.</param>
|
||||
public static void RecordVexSigning(bool success, bool rekorSubmitted)
|
||||
{
|
||||
var tags = new TagList
|
||||
{
|
||||
{ "success", success ? "true" : "false" },
|
||||
{ "rekor_submitted", rekorSubmitted ? "true" : "false" },
|
||||
};
|
||||
|
||||
VexSigningCounter.Add(1, tags);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Reachability Metrics
|
||||
|
||||
// Counter: policy_reachability_applied_total{state}
|
||||
|
||||
Reference in New Issue
Block a user