PostHog / PostHog/posthog-flutter
Feature request: autocapture native logs (gauging interest 👍)
Nobody has claimed this yet.
- Dominant language
- Dart
- Stars
- 97
- Forks
- 85
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 31
Description
Summary
Today, PostHog Logs on Flutter is manual capture only — you emit logs explicitly via captureLog(...) / the logger API. The SDK does not automatically capture the platform's native log streams.
We're considering adding autocapture for native logs so existing logging "just works" with zero extra instrumentation, and we'd like to gauge how much demand there is before building it.
👍 this issue if you'd use it. Comments about your use case are even more helpful.
Current behavior
Logs are only sent when you call them yourself:
Posthog().logger.info('checkout completed', {'order_id': 'ord_789'});
The following are not captured automatically: print, debugPrint, and dart:developer's log.
Proposed behavior
An opt-in config flag (e.g. logs.autocaptureNativeLogs = true) that hooks into print, debugPrint, and dart:developer's log and forwards them as PostHog log records — respecting the existing severity mapping, beforeSend redaction, rate cap, and resource attributes.
Related issues (other SDKs)
Same proposal is being tracked across our mobile SDKs:
- iOS: PostHog/posthog-ios#673
- Android: PostHog/posthog-android#586
- React Native: PostHog/posthog-js#3956
- Flutter: PostHog/posthog-flutter#449 (this issue)
Posted by the mobile SDK team to gauge interest — not yet scheduled.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
This issue is a demand-gathering proposal and names no implementation files or tests. Start by reviewing the existing captureLog/logger API and the logs configuration, then map how beforeSend, rate caps, severity mapping, and resource attributes currently work. Done would require an agreed, scheduled scope for opt-in native-log autocapture; the issue is not yet scheduled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart, flutter
- Domain
- mobile-dev, observability
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100