Skip to content

fix(observability): logger.error(err.stack) bypasses Winston PostHog dedup → 2 $exception events per uncaught error #3655

@PierreBrisorgueil

Description

@PierreBrisorgueil

Discovered during Wave 4 prod validation 2026-05-11. Express 4-arg error middleware fires errorTracker.captureException then logger.error(err.stack) — but err.stack is a STRING so PostHogErrorTransport can't read the posthogCaptured dedup flag. Each uncaught error produces 2 $exception events instead of 1. Fix: pass err via { error: err } meta so Winston transport can read the flag. Plan: infra/docs/superpowers/plans/2026-05-11-posthog-observability-wave4.md follow-up.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions