#969

feat: add metrics for auth_query and SecretChecker erpc calls

Draftmentelswants to merge intofrom

Summary

Closes POOLER-392.

Adds four distribution metrics to improve observability of auth_query and SecretChecker operations:

  • supavisor_auth_query_connection_duration — Postgrex connection setup time, emitted from AuthQuery.start_link/2
  • supavisor_auth_query_query_duration — queue wait + query RTT, emitted from AuthQuery.fetch_user_secret/3; logs a warning when execution exceeds 1s
  • supavisor_secret_checker_get_secrets_duration_{local,remote} — full erpc round-trip for get_secrets, split by locality (same pattern as pool_checkout)
  • supavisor_secret_checker_update_credentials_duration_{local,remote} — same for update_credentials

All metrics tagged with status only — no per-tenant tags to avoid cardinality explosion.

Also fixes Logger.error in do_get_secrets/1 to include project: tenant structured metadata (the function runs in the erpc caller process, not the SecretChecker GenServer, so the metadata was previously missing).

🤖 Generated with Claude Code

Activity

16
mentelsreviewed5mo ago
mentelsreviewed5mo ago
mentelsreviewed5mo ago
mentelsreviewed5mo ago
v0idpwnreviewed5mo ago
v0idpwnreviewed5mo ago
v0idpwnreviewed5mo ago
v0idpwnreviewed5mo ago
github-advanced-security[bot]reviewed5mo ago

This pull request is a draft

Merging is unavailable until it is marked ready for review.