You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(metrics): honor send=False, fork-safe locks, flush on module shutdown
Address review of the metrics capture surface:
- _do_flush discards the window without transmitting when client.send is
False, mirroring event capture (record locally, send nothing).
- _reinit_after_fork replaces the metrics locks (_metrics_lock, _lock,
_flush_lock) and drops the inherited window/timer in the forked child, so
a child can't deadlock on a lock held by a vanished parent thread.
- Module-level shutdown() delegates to Client.shutdown() so the final
metrics window is flushed for apps using the global SDK lifecycle.
Generated-By: PostHog Code
Task-Id: 0d65d94c-c18a-4d84-93f6-18eb54876551
0 commit comments