-
Notifications
You must be signed in to change notification settings - Fork 2.3k
fix: metrics on posthog #6024
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: metrics on posthog #6024
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds anonymous usage telemetry to goose using PostHog, firing once per session creation rather than session start. Users can opt out via the GOOSE_TELEMETRY_OFF=1 environment variable.
Key changes:
- Adds privacy-preserving telemetry collection (OS, arch, version, provider, model)
- Implements opt-out mechanism via environment variable
- Uses fire-and-forget async pattern to avoid blocking session creation
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| crates/goose/src/telemetry.rs | New module implementing PostHog telemetry with opt-out support |
| crates/goose/src/session/session_manager.rs | Integrates telemetry call after session creation |
| crates/goose/src/lib.rs | Exports telemetry module |
| crates/goose/Cargo.toml | Adds posthog-rs 0.3.7 dependency |
| Cargo.lock | Lock file updates for new dependency and transitive deps |
* 'main' of github.com:block/goose: gov: new LF Projects LLC section (#6027) Cleanup: Remove Recipe Key Flow (#6015) chore(deps): bump mdast-util-to-hast from 13.2.0 to 13.2.1 in /documentation (#5963) remove problematic corrupted woff font (#6006) Added search bar / filtering for recipes (#6019) Hide recipe icon in empty chat (#6022) docs: provider and model config (#6008) Show modal selector after configuring a provider (#6005) docs: additional mcp sampling resources (#6020) Flutter PR Code Review (#6011) feat(mcp): elicitation support (#5965) Onboarding detect provider from api key (#5955) Fix PATH on Windows for extensions (#6000) recipe(datahub): Add a recipe for searching & understanding data in DataHub (#5859) fix params not being substituted in activities (#5992)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
zanesq
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
verified working!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
Co-authored-by: Zane Staggs <[email protected]> Co-authored-by: Zane <[email protected]>
* 'main' of github.com:block/goose: blog: How to stop your ai agent from making unwanted code changes (#6055) Fix typo in prompt (#6007) Docs for new terminal integration feature (#6042) fix: linux goosed crashing libssl error (#6051) chore(release): release version 1.16.0 (minor) (#5985) fix: metrics on posthog (#6024) gov: new LF Projects LLC section (#6027) Cleanup: Remove Recipe Key Flow (#6015) chore(deps): bump mdast-util-to-hast from 13.2.0 to 13.2.1 in /documentation (#5963) remove problematic corrupted woff font (#6006) Added search bar / filtering for recipes (#6019)
…aults-per-session * 'main' of github.com:block/goose: blog: How to stop your ai agent from making unwanted code changes (#6055) Fix typo in prompt (#6007) Docs for new terminal integration feature (#6042) fix: linux goosed crashing libssl error (#6051) chore(release): release version 1.16.0 (minor) (#5985) fix: metrics on posthog (#6024) gov: new LF Projects LLC section (#6027) Cleanup: Remove Recipe Key Flow (#6015) chore(deps): bump mdast-util-to-hast from 13.2.0 to 13.2.1 in /documentation (#5963) remove problematic corrupted woff font (#6006) Added search bar / filtering for recipes (#6019)
…nses-streaming * 'main' of github.com:block/goose: blog: How to stop your ai agent from making unwanted code changes (#6055) Fix typo in prompt (#6007) Docs for new terminal integration feature (#6042) fix: linux goosed crashing libssl error (#6051) chore(release): release version 1.16.0 (minor) (#5985) fix: metrics on posthog (#6024) gov: new LF Projects LLC section (#6027) Cleanup: Remove Recipe Key Flow (#6015) chore(deps): bump mdast-util-to-hast from 13.2.0 to 13.2.1 in /documentation (#5963) remove problematic corrupted woff font (#6006) Added search bar / filtering for recipes (#6019) Hide recipe icon in empty chat (#6022) docs: provider and model config (#6008) Show modal selector after configuring a provider (#6005) docs: additional mcp sampling resources (#6020) Flutter PR Code Review (#6011) feat(mcp): elicitation support (#5965)
* 'main' of github.com:block/goose: blog: How to stop your ai agent from making unwanted code changes (#6055) Fix typo in prompt (#6007) Docs for new terminal integration feature (#6042) fix: linux goosed crashing libssl error (#6051) chore(release): release version 1.16.0 (minor) (#5985) fix: metrics on posthog (#6024) gov: new LF Projects LLC section (#6027)
…oose into dkatz/openai-responses-streaming * 'dkatz/openai-responses-streaming' of github.com:block/goose: Rm stray leave errors in the context blog: How to stop your ai agent from making unwanted code changes (#6055) Fix typo in prompt (#6007) Docs for new terminal integration feature (#6042) fix: linux goosed crashing libssl error (#6051) chore(release): release version 1.16.0 (minor) (#5985) fix: metrics on posthog (#6024) gov: new LF Projects LLC section (#6027) Cleanup: Remove Recipe Key Flow (#6015) chore(deps): bump mdast-util-to-hast from 13.2.0 to 13.2.1 in /documentation (#5963) remove problematic corrupted woff font (#6006) Added search bar / filtering for recipes (#6019) Hide recipe icon in empty chat (#6022) docs: provider and model config (#6008) Show modal selector after configuring a provider (#6005) docs: additional mcp sampling resources (#6020) Flutter PR Code Review (#6011) feat(mcp): elicitation support (#5965)
This records anon metrics on session create (vs on start) to https://posthog.com/
for this to work, needs to have opt in/out for the setting, and wording changes around what data goes where
(this is similar to what other OSS projects do)
Opt-out:
GOOSE_TELEMETRY_OFF=1@zanesq if we are to use this - will need to opt out of course (separate to OTEL in this case).