Skip to content

Commit c8cabc4

Browse files
feat: replace PostHog with first-party feedback (#1665)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
1 parent 403eab7 commit c8cabc4

113 files changed

Lines changed: 3200 additions & 4451 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
"hephaestus": minor
3+
---
4+
5+
Instance administrators can publish workspace-targeted surveys and review survey responses and product feedback
6+
without sending data to an external analytics service. Contributors can send feedback, respond to surveys, or
7+
permanently dismiss them; submissions remain in the instance database.
8+
9+
**Operators:** the PostHog integration is removed entirely. `POSTHOG_ENABLED`, `POSTHOG_API_HOST`,
10+
`POSTHOG_PROJECT_ID`, `POSTHOG_PROJECT_API_KEY`, and `POSTHOG_PERSONAL_API_KEY` are no longer read
11+
and can be deleted from your `.env`; no replacement variable is needed and no other action is
12+
required.
Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
---
2-
"hephaestus": minor
32
---
43

5-
Instances that run PostHog now receive Core Web Vitals — largest contentful paint, cumulative layout
6-
shift, first contentful paint and interaction to next paint — for the web application, so a slow
7-
page is visible in analytics rather than only in a complaint. The application never measured them
8-
before. Nothing is captured without the analytics consent that already gates every other event, and
9-
network request timing stays off.
4+
Superseded before release by the first-party feedback replacement in this pull request.

.github/workflows/deploy-locked-compose.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,6 @@ jobs:
7676
SECRET_NATS_USERNAME: ${{ secrets.NATS_USERNAME }}
7777
SECRET_NATS_PASSWORD: ${{ secrets.NATS_PASSWORD }}
7878
SECRET_OUTLINE_OAUTH_CLIENT_SECRET: ${{ secrets.OUTLINE_OAUTH_CLIENT_SECRET }}
79-
SECRET_POSTHOG_PERSONAL_API_KEY: ${{ secrets.POSTHOG_PERSONAL_API_KEY }}
80-
SECRET_POSTHOG_PROJECT_API_KEY: ${{ secrets.POSTHOG_PROJECT_API_KEY }}
8179
SECRET_SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
8280
SECRET_WEBHOOK_SECRET: ${{ secrets.WEBHOOK_SECRET }}
8381
run: |
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#### 🔴 The PostHog integration is removed
2+
3+
**Affected**: deployments that carry PostHog settings in their `.env` or pass them as deploy
4+
secrets. Deployments that never configured PostHog need no changes.
5+
6+
**Before**: the stack read `POSTHOG_ENABLED`, `POSTHOG_API_HOST`, `POSTHOG_PROJECT_ID`,
7+
`POSTHOG_PROJECT_API_KEY`, and `POSTHOG_PERSONAL_API_KEY`, and the webapp could load the PostHog
8+
client and its cloud-backed surveys when they were set.
9+
10+
**After**: none of these variables are read anywhere; product feedback and surveys are stored in
11+
the instance's own PostgreSQL and reviewed in **Administration → Feedback**. No replacement
12+
variable exists.
13+
14+
**Migration**: delete the `POSTHOG_*` lines from your `.env` and remove any corresponding deploy
15+
or preview secrets; leftover values are ignored but keep an unused credential in circulation, so
16+
also revoke the PostHog personal API key in PostHog itself if one was ever issued. The schema
17+
migration for the new feedback tables runs automatically.

CHANGELOG.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1102,7 +1102,6 @@
11021102

11031103
The user guide now matches the shipped multi-workspace GitHub and GitLab setup, current Heph chat, practice-feedback delivery, optional leaderboard and leagues, and configurable Slack digest. Account settings now state clearly that turning off pull-request comments controls delivery only; reviews still run and observations remain available to workspace admins.
11041104

1105-
The TUM privacy statement now describes the self-service data export, consent-gated PostHog and Sentry storage, comment-delivery preference, and absence of HTTP access logs as implemented.
11061105

11071106
- When a review has more to say than one comment can hold, the suggestions that survive are now chosen by how much of your change they were actually seen in, rather than by how sure the reviewer said it felt. Previously every observation carried a self-reported confidence score, and that score decided which suggestions made the cut and which strength got acknowledged. Measured across 580 real observations it never once dropped below 90% and was a flat 100% more than half the time — so it was deciding those cuts on noise. It is gone.
11081107

docker/.env.example

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -238,12 +238,6 @@ OUTLINE_OAUTH_CLIENT_SECRET=
238238
SENTRY_DSN=
239239
SENTRY_ENVIRONMENT=production
240240

241-
# PostHog analytics
242-
POSTHOG_ENABLED=false
243-
POSTHOG_API_HOST=https://app.posthog.com
244-
POSTHOG_PROJECT_API_KEY=
245-
POSTHOG_PROJECT_ID=
246-
POSTHOG_PERSONAL_API_KEY=
247241

248242
# Enable TanStack Devtools in the webapp (keep false in production)
249243
TANSTACK_DEVTOOLS_ENABLED=false

docker/compose.app.yaml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,6 @@ services:
4545
LEGAL_PROFILE: ${LEGAL_PROFILE:-}
4646
SENTRY_ENVIRONMENT: ${SENTRY_ENVIRONMENT}
4747
SENTRY_DSN: ${SENTRY_DSN}
48-
POSTHOG_ENABLED: ${POSTHOG_ENABLED:-false}
49-
POSTHOG_PROJECT_API_KEY: ${POSTHOG_PROJECT_API_KEY}
50-
POSTHOG_API_HOST: ${POSTHOG_API_HOST}
5148
TANSTACK_DEVTOOLS_ENABLED: ${TANSTACK_DEVTOOLS_ENABLED:-false}
5249
ports:
5350
- "80"
@@ -180,10 +177,6 @@ services:
180177
LEADERBOARD_SCHEDULE_DAY: ${LEADERBOARD_SCHEDULE_DAY:-2}
181178
LEADERBOARD_SCHEDULE_TIME: ${LEADERBOARD_SCHEDULE_TIME:-9}
182179
SENTRY_DSN: ${SENTRY_DSN}
183-
POSTHOG_ENABLED: ${POSTHOG_ENABLED:-false}
184-
POSTHOG_API_HOST: ${POSTHOG_API_HOST:-https://app.posthog.com}
185-
POSTHOG_PROJECT_ID: ${POSTHOG_PROJECT_ID:-}
186-
POSTHOG_PERSONAL_API_KEY: ${POSTHOG_PERSONAL_API_KEY:-}
187180
WEBHOOK_SECRET: ${WEBHOOK_SECRET}
188181
# WEBHOOK_EXTERNAL_URL intentionally unset: GitLab auto-registration defaults it to
189182
# APPLICATION_HOST_URL (same origin here), then appends /webhooks/gitlab itself.

docker/preview/compose.app.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,6 @@ services:
336336
TANSTACK_DEVTOOLS_ENABLED: "true"
337337
SENTRY_ENVIRONMENT: preview
338338
SENTRY_DSN: ""
339-
POSTHOG_ENABLED: "false"
340339
depends_on:
341340
appserver:
342341
condition: service_healthy

docker/self-host/.env.example

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,7 @@ GH_AUTH_TOKEN=
109109
# Sentry error tracking. Leave blank to disable.
110110
SENTRY_DSN=
111111
SENTRY_ENVIRONMENT=production
112-
# PostHog product analytics — disabled unless POSTHOG_ENABLED=true; the keys below
113112
# do nothing on their own. Leave the two keys present (blank is fine) either way.
114-
#POSTHOG_ENABLED=false
115-
POSTHOG_PROJECT_API_KEY=
116-
POSTHOG_API_HOST=
117113

118114
# Container memory limits for the two JVMs. Each sizes its heap from its own limit, so lowering a
119115
# limit lowers the heap with it. Lower both before the first start on a host below 8 GB RAM.

docs/admin/buildpacks-cds-decision.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ The training run boots under the `cds-training` profile (`application-cds-traini
2020

2121
## Why not Spring AOT processing (`spring.aot.enabled=true`)
2222

23-
AOT processing evaluates `@Conditional` at **build time**, baking the build-time environment into the image ([reference](https://docs.spring.io/spring-boot/reference/packaging/aot.html)). The codebase has ~70 `@ConditionalOn*` sites (Sentry, Slack, PostHog, Resilience4j, etc.) that depend on env vars intentionally absent in CI — enabling AOT now would silently drop those beans from the production image. Revisit when the JDK move to Java 25 LTS lands (epic #1096); [JEP 483 AOT cache](https://openjdk.org/jeps/483) then supersedes CDS via `BP_JVM_AOTCACHE_ENABLED=true`.
23+
AOT evaluates conditional bean registration at build time. Hephaestus selects integrations and runtime roles from
24+
deployment configuration, so an image built in CI cannot safely fix those choices without omitting beans needed in
25+
production. CDS preserves runtime configuration while improving startup.
2426

2527
## Why not GraalVM Native Image
2628

0 commit comments

Comments
 (0)