Skip to content

fix(compose): ship the Agent Canvas PostHog key and automation 1.27.0 (OHE-3657) - #1200

Merged
hieptl merged 1 commit into
mainfrom
hiep/ohe-3657-compose-posthog-key
Nov 5, 2026
Merged

hieptl merged 1 commit into
mainfrom
hiep/ohe-3657-compose-posthog-key

Conversation

@hieptl

@hieptl hieptl commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

HUMAN:

  • A human has tested these changes.

AGENT:


Why

A stock install (git clone + docker compose up --wait) sends none of the OHE onboarding events to PostHog. #1103 added the events and turned analytics on in the compose stack, but POSTHOG_CLIENT_KEY defaults to empty. The app, the worker and the automation server therefore keep PostHog disabled. The compose file also pins automation 1.26.1, and ohe_automation_created first ships in automation 1.27.0.

Summary

  • POSTHOG_CLIENT_KEY (app, worker) and AUTOMATION_POSTHOG_API_KEY default to the Agent Canvas production project key. The ${POSTHOG_CLIENT_KEY-…} form (no colon) keeps an explicitly empty value empty, so the documented opt-out still works.
  • Automation goes from 1.26.1 to 1.27.0, which sends ohe_automation_created with automation_name and is_first_automation_in_org.
  • The comment now names an empty POSTHOG_CLIENT_KEY as the way to send nothing, because ENABLE_POSTHOG_ANALYTICS=false alone does not stop the automation server.

Issue Number

OHE-3657: https://linear.app/all-hands-ai/issue/OHE-3657/posthog-instrument-first-time-user-onboarding-with-posthog-events

How to Test

  1. Resolved config, run from a directory with a copy of this docker-compose.yml:
    • No .env: docker compose config shows the key on app, worker and automation-server, and automation:1.27.0.
    • .env with POSTHOG_CLIENT_KEY=: all three show "".
    • .env with POSTHOG_CLIENT_KEY=<other key>: all three show that key.
  2. End to end, from a clean stack: docker compose down -v && docker compose up --wait. Sign up as the first Super Admin, finish /install, then create an automation in /canvas. In the Agent Canvas PostHog project, ohe_user_signed_up, ohe_instance_setup_completed and ohe_automation_created appear on the person whose email is the address used to sign up.

Step 1 was run, and all three cases matched. Step 2 has not been run yet, because it sends real events to the production project.

Video/Screenshots

None: compose configuration only, no UI change.

Type

  • Bug fix
  • Feature
  • Refactor
  • Breaking change
  • Docs / chore

Notes

  • The key is the public, client-side project key that released Agent Canvas builds already use. It is not a secret.
  • Automation 1.27.0 adds migrations 036 and 037. The compose stack applies them on startup (AUTOMATION_RUN_MIGRATIONS_ON_STARTUP).
  • Helm installs are unaffected, because only the compose file changes.
  • With a key in place, compose installs send all server-side analytics events, not only the three onboarding events that the Docker Compose docs list.

Enterprise server image for this PR:

ghcr.io/openhands/enterprise-server:sha-b5f9e26

… (OHE-3657)

A stock `docker compose up` sent no onboarding events to PostHog.
POSTHOG_CLIENT_KEY defaulted to empty, which keeps PostHog disabled in
the app, the worker and the automation server, and the pinned automation
1.26.1 predates `ohe_automation_created`.

- Default POSTHOG_CLIENT_KEY (app, worker) and AUTOMATION_POSTHOG_API_KEY
  to the Agent Canvas production project key. `${VAR-default}` keeps an
  explicitly empty POSTHOG_CLIENT_KEY empty, so the documented opt-out
  still works.
- Bump automation 1.26.1 -> 1.27.0, which sends `ohe_automation_created`
  with `automation_name` and `is_first_automation_in_org`.
- Name an empty POSTHOG_CLIENT_KEY as the opt-out in the comment:
  ENABLE_POSTHOG_ANALYTICS=false alone does not stop the automation
  server.
@github-actions github-actions Bot added the type: fix A bug fix label Nov 5, 2026
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Coverage report

This PR does not seem to contain any modification to coverable code.

@hieptl
hieptl marked this pull request as ready for review November 5, 2026 05:22

@tofarr tofarr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🍰

@hieptl
hieptl merged commit bff94e6 into main Nov 5, 2026
24 checks passed
@hieptl
hieptl deleted the hiep/ohe-3657-compose-posthog-key branch November 5, 2026 13:09
@openhands-release-bot openhands-release-bot Bot added the released: 1.87.0 Shipped in 1.87.0 label Nov 5, 2026
@openhands-release-bot

Copy link
Copy Markdown
Contributor

🚀 Released in 1.87.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released: 1.87.0 Shipped in 1.87.0 type: fix A bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants