Merged
Conversation
Contributor
There was a problem hiding this comment.
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)
zanesq
added a commit
that referenced
this pull request
Dec 10, 2025
Co-authored-by: Zane Staggs <zane@squareup.com> Co-authored-by: Zane <75694352+zanesq@users.noreply.github.com>
zanesq
added a commit
that referenced
this pull request
Dec 10, 2025
* '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)
zanesq
added a commit
that referenced
this pull request
Dec 10, 2025
…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)
katzdave
added a commit
that referenced
this pull request
Dec 10, 2025
…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)
katzdave
added a commit
that referenced
this pull request
Dec 11, 2025
* '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)
katzdave
added a commit
that referenced
this pull request
Dec 12, 2025
…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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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).