1.35.4
Patch Changes
-
#3895
ce528edThanks @turnipdabeets! - Console log auto-capture (logs: { captureConsoleLogs: true }) now flows through the same pipeline asposthog.captureLog(),posthog.logger.*, and PostHog's other SDKs, instead of OpenTelemetry. As a result:- the bundled OpenTelemetry dependencies are removed, shrinking the lazily-loaded logs chunk
- auto-captured console logs now run through
logs.beforeSend(the same hook ascaptureLog/logger.*), so you can redact or drop sensitive console output before it's sent. To treat console logs differently from manual logs, branch on the record'slog.sourceattribute: auto-captured console logs set it toconsole.<method>(e.g.console.error), while manualcaptureLog/logger.*logs leave it unset - console logs now link to the person's profile: they carry the person id as
posthogDistinctId, the attribute PostHog uses to associate logs with a person (docs). The old path useddistinct_id, which isn't used for person linking by default, so console logs previously didn't appear on person profiles unless you'd configured a custom key.
Console logs keep their
posthog-browser-logsservice.name, theirconsoleinstrumentation scope, and theirlog.source: console.<level>attribute.As part of moving onto the shared pipeline, console records now use PostHog's standard log field names — the same ones programmatic web logs and other SDKs use, and the ones the Logs UI surfaces. For the fields below the values are unchanged — only the attribute names/locations differ:
distinct_id→posthogDistinctId(record attribute)location.href→url.full(record attribute; same value — the page URL)session.id(resource attribute) →sessionId(record attribute) — renamed and movedhostandwindow.idmove from resource attributes to record attributes (names unchanged)- records also now carry the standard SDK context shared by other logs, including
feature_flags
For most projects this needs no action — these are already the canonical log fields. The only thing to update is a saved Logs query or dashboard built specifically on an old console attribute name, for example:
attributes.distinct_id→attributes.posthogDistinctIdattributes.location.href→attributes.url.fullresource.attributes.session.id→attributes.sessionIdresource.attributes.host/resource.attributes.window.id→attributes.host/attributes.window.id(2026-06-22)