Observability: set application_name on backend/export DB connections #5

Open
opened 2026-06-06 06:28:16 +00:00 by hclaude · 0 comments
Owner

Observability: set application_name on backend/export DB connections

Forensics were slowed because every connection logs app=[unknown] — the
export job could only be identified via the t4a_last_run_date_lasttaskrundate
INSERT and the source host IP (2c0f:fc78:feed:1148::28), not directly.

Task

  • Set a meaningful application_name on the export/management-command DB
    connections (e.g. via Django OPTIONS={'application_name': 'igo_export'}
    or PGAPPNAME), so it appears in %a of log_line_prefix and in
    pg_stat_activity.
  • Ideally distinguish web vs batch vs each export job.

Priority: LOW — quality-of-life for future investigations.

## Observability: set `application_name` on backend/export DB connections Forensics were slowed because every connection logs `app=[unknown]` — the export job could only be identified via the `t4a_last_run_date_lasttaskrundate` INSERT and the source host IP (`2c0f:fc78:feed:1148::28`), not directly. ### Task - [ ] Set a meaningful `application_name` on the export/management-command DB connections (e.g. via Django `OPTIONS={'application_name': 'igo_export'}` or `PGAPPNAME`), so it appears in `%a` of `log_line_prefix` and in `pg_stat_activity`. - [ ] Ideally distinguish web vs batch vs each export job. **Priority: LOW** — quality-of-life for future investigations.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ECS-investigations/T4A-DB-logs#5
No description provided.