Skip to content

Conversation

@michaelneale
Copy link
Collaborator

@michaelneale michaelneale commented Dec 9, 2025

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).

@michaelneale michaelneale marked this pull request as ready for review December 9, 2025 10:31
Copilot AI review requested due to automatic review settings December 9, 2025 10:31
Copy link
Contributor

Copilot AI left a 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

michaelneale and others added 2 commits December 9, 2025 21:42
* '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)
Copilot AI review requested due to automatic review settings December 9, 2025 19:04
Copy link
Contributor

Copilot AI left a 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.

Copy link
Collaborator

@zanesq zanesq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

verified working!

Copilot AI review requested due to automatic review settings December 10, 2025 00:28
Copy link
Contributor

Copilot AI left a 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 zanesq merged commit 9b6a1c1 into main Dec 10, 2025
10 checks passed
@zanesq zanesq deleted the micn/posthog branch December 10, 2025 00:28
zanesq added a commit that referenced this pull request Dec 10, 2025
Co-authored-by: Zane Staggs <[email protected]>
Co-authored-by: Zane <[email protected]>
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants