Background agent and flush interval support
Open
Nobody has claimed this yet.
enhancement
- Dominant language
- PHP
- Stars
- 33
- Forks
- 34
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 13
Description
Description
Since PHP is singlethreaded, we cannot do the same as Python, Go, etc
An idea would be:
- Add lib/Consumer/Agent.php
- Add "agent" => Agent::class to Client::CONSUMERS
- Add config:
- agent_host
- agent_port
- agent_timeout_ms
- agent_fallback
- Add a separate executable, maybe bin/posthog-agent, or document using a PostHog sidecar/daemon if one exists.
- Agent batches events and posts to /batch/.
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
Start by reading the existing consumers and Client::CONSUMERS, then inspect how configuration and event posting are handled. The issue mentions lib/Consumer/Agent.php, a possible bin/posthog-agent executable or sidecar, and the /batch/ endpoint; confirm the intended agent architecture and fallback behavior before implementation. Done means the agreed agent path, configuration, batching, and documentation are covered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100