Skip to content

armgit / eve

Public Imported from GitHub
0

The Open Framework for Building Agents

fix(docs): use the runtime context key PostHog reads for the distinct id (#3998)

roboeve[bot]c305e89ecf25
diff --git a/apps/docs/lib/integrations/data.ts b/apps/docs/lib/integrations/data.ts
index 94afb3981..3ff9dbe7d 100644
--- a/apps/docs/lib/integrations/data.ts
+++ b/apps/docs/lib/integrations/data.ts
@@ -2403,7 +2403,7 @@ export default otelIntegration({
input.session.auth.initiator?.principalId ??
input.session.auth.current?.principalId;
- return distinctId ? { "posthog.distinct_id": distinctId } : undefined;
+ return distinctId ? { posthog_distinct_id: distinctId } : undefined;
},
});
\`\`\``,
diff --git a/apps/docs/lib/integrations/posthog-instrumentation.test.ts b/apps/docs/lib/integrations/posthog-instrumentation.test.ts
index be620388b..68c0dcd76 100644
--- a/apps/docs/lib/integrations/posthog-instrumentation.test.ts
+++ b/apps/docs/lib/integrations/posthog-instrumentation.test.ts
@@ -29,7 +29,7 @@ function posthogDistinctId(attributes: Record<string, unknown>): unknown {
}
describe("PostHog instrumentation template", () => {
- it.fails("records the session initiator under a span attribute PostHog reads as the distinct id", async () => {
+ it("records the session initiator under a span attribute PostHog reads as the distinct id", async () => {
await import("../../registry/instrumentation/posthog");
const { runtimeContext } = captured;
if (runtimeContext === undefined) throw new Error("template did not register runtimeContext");
diff --git a/apps/docs/registry/instrumentation/posthog.ts b/apps/docs/registry/instrumentation/posthog.ts
index 62f90f188..3b5bdb5ba 100644
--- a/apps/docs/registry/instrumentation/posthog.ts
+++ b/apps/docs/registry/instrumentation/posthog.ts
@@ -18,6 +18,6 @@ export default otelIntegration({
const distinctId =
input.session.auth.initiator?.principalId ?? input.session.auth.current?.principalId;
- return distinctId ? { "posthog.distinct_id": distinctId } : undefined;
+ return distinctId ? { posthog_distinct_id: distinctId } : undefined;
},
});