feat(tracing): named instrument spans on every service method (PMS-126) #64
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/pms-126-tracing-spans"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
#[tracing::instrument(skip_all, fields(tenant_id = %tenant_id))](orskip_allonly when notenant_idparameter) to everypub async fnacross the eighteensrc/modules/*/service.rsfiles and the two workers (notifications/worker.rs,rmm/worker.rs). 249 attribute insertions; no behavior change.skip_allis the safe default because service args include sqlx pools,Arc<dyn Mailer>, large request DTOs. Capturingtenant_idviaDisplaykeeps traces grep-able by tenant without leaking the rest of the parameter surface.tenant_id: Option<Uuid>site (audit::AuditService::list) uses?tenant_idDebug format becauseOptionis notDisplay.Test plan
cargo fmt --all --checkcargo clippy --all-targets -- -D warningscargo check --all-targetscargo test --lib+ existing integration tests still pass (attributes are non-behavioral)RUST_LOG=mokosh_server=debug, aGET /api/v1/ticketsrequest shows aTicketService::list_tickets{tenant_id=...}span enclosing the DB call sites.Closes PMS-126. Cross-cutting issue #4 from
dev-docs/codebase-state.md.