android-v3.47.0
Minor Changes
-
8d11398: Add public Logs API:
PostHog.logger.trace/debug/info/warn/error/fatal(message, attrs?)plus aPostHogLogsConfigfor serviceName, environment, resourceAttributes, rate cap, andaddBeforeSendredaction hooks. Logs ship via OTLP/JSON to/i/v1/logsand pick up auto-attached attributes (app.state, distinctId, sessionId, screen name, feature flags). Matches the equivalent surfaces on posthog-ios and posthog-react-native. -
8d11398: Auto-attach
$screen_nameto every captured event afterPostHog.screen()has been called (manually or via Activity-lifecycle auto-capture). Cached value is cleared byreset()andclose().To opt out of
$screen_namestamping entirely, setPostHogAndroidConfig.captureScreenViews = falseand stop callingPostHog.screen()manually. DisablingcaptureScreenViewsalone is not sufficient — a single manualPostHog.screen("Home")call will re-enable stamping.