Skip to content

posthog-js@1.390.0

Choose a tag to compare

@github-actions github-actions released this 17 Jun 17:18
· 20 commits to main since this release
Immutable release. Only release title and notes can be modified.
f4bc980

1.390.0

Minor Changes

  • #3869 81b79fb Thanks @turnipdabeets! - Add a beforeSend option to the logs config, so you can inspect, redact, or drop log records before they're sent:

    posthog.init('<token>', {
        logs: {
            beforeSend: (log) => {
                // return null to drop the log, or return the (optionally modified) log to keep it
                if (log.body.includes('password')) {
                    return null
                }
                return log
            },
        },
    })

    beforeSend accepts a single function or an array of functions (applied left to right); returning null from any of them drops the record. It runs for logs sent via both posthog.captureLog() and posthog.logger.*. (2026-06-17)

Patch Changes

  • Updated dependencies [81b79fb]:
    • @posthog/types@1.390.0