Skip to content

Commit 668cec4

Browse files
committed
Drop integration slugs from analytics events
1 parent 49095aa commit 668cec4

4 files changed

Lines changed: 10 additions & 16 deletions

File tree

apps/host-selfhost/src/execution.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export const SelfHostHostConfig: Layer.Layer<HostConfig> = Layer.sync(HostConfig
5858
onIntegrationChange: (event) =>
5959
selfHostAnalytics.record(
6060
event.kind === "added" ? "integration_added" : "integration_removed",
61-
{ plugin_key: event.pluginKey, integration_slug: String(event.slug) },
61+
{ plugin_key: event.pluginKey },
6262
),
6363
};
6464
});

apps/local/src/executor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ const createLocalExecutorLayer = (options: LocalExecutorOptions = {}) => {
199199
onIntegrationChange: (event) =>
200200
localAnalytics.record(
201201
event.kind === "added" ? "integration_added" : "integration_removed",
202-
{ plugin_key: event.pluginKey, integration_slug: String(event.slug) },
202+
{ plugin_key: event.pluginKey },
203203
),
204204
onElicitation: "accept-all",
205205
oauthEndpointUrlPolicy: { allowHttp: true },

packages/core/analytics/src/analytics.test.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,7 @@ describe("Analytics", () => {
9494
plane: "mcp",
9595
toolkit: false,
9696
});
97-
yield* analytics.record("integration_added", {
98-
plugin_key: "openapi",
99-
integration_slug: "github",
100-
});
97+
yield* analytics.record("integration_added", { plugin_key: "openapi" });
10198
yield* analytics.flush;
10299

103100
const batches = yield* Ref.get(http.batches);

packages/core/analytics/src/events.ts

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,11 @@
1313
// - Never secrets, tokens, credentials, code, tool arguments or results.
1414
// - Never user free text: no connection names, no tool addresses, no
1515
// toolkit slugs (user-entered labels — send booleans/counts instead).
16-
// - Integration slugs and plugin keys ARE allowed (spec-derived vocabulary,
17-
// matching the browser catalog's `integration_slug` / `plugin_key`).
16+
// - Plugin keys (`openapi`, `mcp`, `graphql`, ...) ARE allowed: a fixed,
17+
// product-defined vocabulary. Integration slugs are NOT — stricter than
18+
// the browser catalog: these events leave the user's own infrastructure,
19+
// and WHICH integrations someone uses is their business, not ours. The
20+
// kind of integration is the product question; the slug is not.
1821
// - Identity is the anonymous per-install id only; no emails, no hostnames,
1922
// no person or org names.
2023
// ---------------------------------------------------------------------------
@@ -48,15 +51,9 @@ export interface AnalyticsEvents {
4851
readonly toolkit: boolean;
4952
};
5053
/** An integration row was created (upsert re-registers are not counted). */
51-
integration_added: {
52-
readonly plugin_key: string;
53-
readonly integration_slug: string;
54-
};
54+
integration_added: { readonly plugin_key: string };
5555
/** An integration was removed by the user. */
56-
integration_removed: {
57-
readonly plugin_key: string;
58-
readonly integration_slug: string;
59-
};
56+
integration_removed: { readonly plugin_key: string };
6057
/** A generative-UI artifact was saved as a new row. */
6158
artifact_created: { readonly via: ArtifactVia };
6259
/**

0 commit comments

Comments
 (0)