Skip to main content

Swift Debugging and Observability

Pass one SQLExecutionEvidenceStore into the trusted UserContext as its telemetry sink. The store retains parameters; publish only the bounded safeSQLEvidence(from:) projection supplied by generated Debug Assist.

await evidence.enableSelect()

let rows = try await Q.schools()
.comment("Diagnose the school search")
.purpose("Verify filters, facets, and relation loading")
.executeForList(context)

let safe = await safeSQLEvidence(from: evidence)

Use enableAll(), enableSelect(), enableMutation(), and disable(); each mode change clears previous entries. diagnosticSQLLogSink, debugSQL, and raw parameters stay in the operator boundary. Toggle querySQLLogEnabled and mutationSQLLogEnabled independently.

Run the exact Facet, grouped aggregate, relation statistic, staged relation, Top-N, and audited save examples from Swift advanced data operations. Use the typed trace to distinguish each staged relation level; do not infer that one plan hydrates an arbitrary-depth graph.

Pass OpenTelemetry through the runtimeTelemetry: initializer of UserContext, FederalClient, or LocalCache. The injected AuditSink is independent from telemetry sampling. Swift Request Policy currently modifies queries; mutation tenant authorization must additionally be enforced and tested at the application/provider/TFP boundary.

Finish with the shared checklist.