mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-04 21:04:37 +08:00
Group events by project ID
This commit is contained in:
parent
757dea48c0
commit
a7c2f2b3a0
4
.vscode/extensions.json
vendored
4
.vscode/extensions.json
vendored
@ -5,7 +5,9 @@
|
||||
// List of extensions which should be recommended for users of this workspace.
|
||||
"recommendations": [
|
||||
"dbaeumer.vscode-eslint",
|
||||
"streetsidesoftware.code-spell-checker"
|
||||
"streetsidesoftware.code-spell-checker",
|
||||
"YoavBls.pretty-ts-errors",
|
||||
"mxsdev.typescript-explorer"
|
||||
],
|
||||
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
|
||||
"unwantedRecommendations": [
|
||||
|
||||
@ -6,6 +6,7 @@ import { StackAssertionError } from "@stackframe/stack-shared/dist/utils/errors"
|
||||
import { prismaClient } from "@/prisma-client";
|
||||
import withPostHog from "@/analytics";
|
||||
import { generateUuid } from "@stackframe/stack-shared/dist/utils/uuids";
|
||||
import { filterUndefined } from "@stackframe/stack-shared/dist/utils/objects";
|
||||
|
||||
type EventType = {
|
||||
id: string,
|
||||
@ -145,6 +146,9 @@ export async function logEvent<T extends EventType[]>(
|
||||
posthog.capture({
|
||||
event: postHogEventName,
|
||||
distinctId,
|
||||
groups: filterUndefined({
|
||||
projectId: typeof data === "object" && data && "projectId" in data ? (data.projectId as string) : undefined,
|
||||
}),
|
||||
timestamp: timeRange.end,
|
||||
properties: {
|
||||
data,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user