feat: PostHog product analytics (#58)

* wip: posthog analytics

* wip: remove posthog-rs crate; call endpoint directly

* make analytics non-blocking

* session start event

* configure analytics for release builds

* remove dev_server_stopped event

* address review comments

* simplify analytics enabled logic

* analytics on by default; send start_session when user enables analytics; new task_attempt_start event

* lower visibility of analytics logs

* chore: bump version to 0.0.37-0

* set analytics to true if previously unset

---------

Co-authored-by: GitHub Action <action@github.com>
This commit is contained in:
Gabriel Gordon-Hall
2025-07-04 16:24:19 +01:00
committed by GitHub
parent 21af641491
commit 2c5eecc845
19 changed files with 452 additions and 35 deletions

View File

@@ -199,6 +199,8 @@ jobs:
cargo build --release --target ${{ matrix.target }} --bin mcp_task_server
env:
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: ${{ matrix.target == 'aarch64-unknown-linux-gnu' && 'aarch64-linux-gnu-gcc' || '' }}
POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY }}
POSTHOG_API_ENDPOINT: ${{ secrets.POSTHOG_API_ENDPOINT }}
- name: Setup Sentry CLI
uses: matbour/setup-sentry-cli@v2