Skip to main content
← Back to list
01Issue
FeatureShippedSwamp ClubPublic
Assigneesskunk-ape

Relationships

#4684 swamp-club: store the integrations each serve reports, and send serve-link events to analytics

Opened by skunk-ape · 11/12/2026· Shipped 11/12/2026

Part of #4459. Sibling swamp issue: #4683 (serve reports its integrations, and its usage events gain a client kind and cover approvals and run control). Integration links are open to every collective with trial, paid or admin standing (#4622), so we need to see how integrations are used.

Problem

From swamp-club's origin/main (6a83c14d):

  • Linking is recorded, but only in Mongo. serve_link_events is an append-only history kept 2 years (lib/infrastructure/mongo-serve-link-repository.ts:38). It has requested, approved, denied, approval_refused, report_refused, recorded, emailed, email_failed and ended, each with time, clientId, collective, integrationId and actor (lib/repositories/serve-link-repository.ts:110-133). The only thing that reads it is scripts/serve-link-audit.ts. Nothing in lib/app/serve-link or routes/api/v1/serve calls analytics, so there's no funnel (started → approved / denied / refused → ended) and no dashboard. The only analytics trace is a page_view for /link.
  • Link events don't say the platform. external.platform (e.g. slack) is on the request and link documents but not on serve_link_events, and requests are deleted after 7 days.
  • We can't see integrations being added. serve_instances stores collectives, hostname, version, mode and tags (lib/domain/serve-instance/serve-instance.ts), with no integrations. swamp-club first learns an integration's id and name when its first link starts.

Proposed change

  1. Store reported integrations. Accept the integrations a serve sends at registration and on change (sibling swamp issue): id, state, createdAt, revokedAt, kept on the serve instance. Unknown or missing fields from older serves are fine. Ids only; no names. Keep a history of state changes so added / revoked counts over time can be queried.
  2. Link events to analytics. In recordLinkEvent (lib/app/serve-link/link-events.ts), also send a reliable analytics event serve_link_<kind> with clientId, collectiveId, integrationId, platform and the actor as distinct id. Leave out the external identity (team, user id, display name, workspace, email), and anything kept from requests that get deleted. Erasure and account merge must cover the analytics events the way they cover serve_link_events today. Check whether the analytics pipeline's erasure already does.
  3. platform on link events. Add it to ServeLinkEvent and set it at each emit site.
  4. Ingest and docs. Make sure telemetry ingest keeps serve's new client and collective properties from the sibling issue, and document them in content/manual/reference/usage-telemetry-events.md, with the new serve-link analytics events wherever internal events are listed.

Done when

  • A serve that reports integrations has them stored with state and dates. Revoking one records the change. A serve that reports none, or an older serve, registers as today.
  • Every link event kind also lands in analytics as serve_link_<kind>, with clientId, collectiveId, integrationId, platform and actor, and no external identity. Tests cover each kind, and that a failed analytics send doesn't fail the link action.
  • serve_link_events rows carry platform.
  • Erasure and merge cover the new analytics events.
  • The usage telemetry reference documents the new serve properties.

Out of scope

Building dashboards on the data. Changes to serve, which are in the sibling issue. Sending integration names or external identities anywhere.

02Bog Flow
✓OPEN✓TRIAGED✓IN PROGRESS✓SHIPPED+ 1 MOREASSIGNED+ 4 MOREREVIEW+ 7 MOREPR_MERGED+ 2 MORESESSION_SUMMARIZED

Shipped

11/12/2026, 8:49:03 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
skunk-ape assigned skunk-ape11/12/2026, 7:48:05 PM
Editable. Press Enter to edit.

system commented 11/12/2026, 7:36:49 PM

Classified automatically when this issue was filed.

  • Source: Swamp Club

If you feel this classification is incorrect, add a ripple to tell us so.

Sign in to post a ripple.