CRM Identity Metrics
Track A settlement admission now emits explicit Prometheus counters for CRM identity resolution and alias lifecycle.
Metrics
pos_identity_resolution_total{outcome}
Resolver-seam counter emitted by SettlementIdentityResolver.resolveIdentifiers().
Outcomes:
dual_id_validated: request carried both identifiers and passed the trusted-alias conflict gate (this can include cases where no trusted alias existed yet)dual_id_conflict: request carried both identifiers and conflicted with trusted alias evidencequote_only_enriched: quote-only request was enriched from an active trusted aliasquote_only_unenriched: quote-only request remained exact-only because no trusted alias existedreservation_only_enriched: reservation-only request was enriched from an active trusted aliasreservation_only_unenriched: reservation-only request remained exact-only because no trusted alias existed
pos_settlement_alias_total{event}
Alias lifecycle counter emitted at the settlement alias repository boundary.
Events:
upserted: a durable dual-ID outcome created or refreshed a trusted alias (atomic upsert — create vs update is not distinguished because Prisma upsert cannot reliably report which path ran)invalidated: an active trusted alias was invalidated
Dashboard
Grafana dashboard:
POS / CRM Identity- uid:
pos-crm-identity
Use it to answer:
- Are one-sided admissions actually happening in production?
- Are they mostly
quote_only_unenrichedorreservation_only_unenriched? - Is trusted alias upsert activity keeping pace, or are unresolved admissions accumulating?
- Are dual-ID conflicts appearing, indicating upstream data drift or alias issues?
Reconciliation report evidence
GET /api/admin/pos/reconciliation/report includes an unresolvedCrmIdentity section for
operator inspection of unresolved one-sided legacy CRM settlements. It is built from persisted
settlement_requests rows where exactly one of quoteId or reservationId is present, no
canonicalBookingId was supplied, and no active trusted SettlementAlias currently resolves the
observed identifier.
That section is observational only. It is not used by settlement admission, replay normalization, or
alias promotion. SettlementAlias remains the only trusted quote-to-reservation authority.
Alert thresholds
Prometheus alert rules:
PosOneSidedCrmAdmissionsWarning- threshold: more than
5unresolved one-sided admissions in30m
- threshold: more than
PosOneSidedCrmAdmissionsCritical- threshold: more than
20unresolved one-sided admissions in30m
- threshold: more than
These thresholds are intentionally tied to unresolved one-sided admissions:
sum(increase(pos_identity_resolution_total{outcome=~"quote_only_unenriched|reservation_only_unenriched"}[30m]))
Interpretation
- Near-zero unresolved one-sided volume means the double-debit window is mostly theoretical.
- Sustained unresolved one-sided volume means the exact-only admission window is materially present in production.
- If the warning or critical alert fires repeatedly, accelerate canonical booking identity work in
#14050.
Scrape contract
- metrics endpoint:
GET /api/admin/pos/metrics - endpoint auth:
PartnerAdminKeyGuard - emitted by:
prom-clientglobal registry - scraped via:
ServiceMonitoron thepos-partner-apiservice using the requiredPOS_PARTNER_ADMIN_KEYfrompos-partner-api-secret