Skip to content

OpenPanel is an open-source web and product analytics platform, an open-source alternative to Mixpanel with optional self-hosting.

fix: remove job id

Carl-Gerhard Lindesvärd677c075e5f98
diff --git a/apps/api/src/controllers/event.controller.ts b/apps/api/src/controllers/event.controller.ts
index 7dc6dd786..59a6d0f4a 100644
--- a/apps/api/src/controllers/event.controller.ts
+++ b/apps/api/src/controllers/event.controller.ts
@@ -1,4 +1,4 @@
-import { generateId, slug } from '@openpanel/common';
+import { generateId } from '@openpanel/common';
import { parseUserAgent } from '@openpanel/common/server';
import { getSalts } from '@openpanel/db';
import { getGeoLocation } from '@openpanel/geo';
@@ -40,15 +40,6 @@ export async function postEvent(
const groupId = uaInfo.isServer
? `${projectId}:${request.body?.profileId ?? generateId()}`
: deviceId;
- const jobId = [
- slug(request.body.name),
- timestamp,
- projectId,
- deviceId,
- groupId,
- ]
- .filter(Boolean)
- .join('-');
await getEventsGroupQueueShard(groupId).add({
orderMs: new Date(timestamp).getTime(),
data: {
@@ -65,7 +56,6 @@ export async function postEvent(
sessionId: sessionId ?? '',
},
groupId,
- jobId,
});
reply.status(202).send('ok');
diff --git a/apps/api/src/controllers/track.controller.ts b/apps/api/src/controllers/track.controller.ts
index b1ddaed11..11d3e1989 100644
--- a/apps/api/src/controllers/track.controller.ts
+++ b/apps/api/src/controllers/track.controller.ts
@@ -1,4 +1,4 @@
-import { generateId, slug } from '@openpanel/common';
+import { generateId } from '@openpanel/common';
import { generateDeviceId, parseUserAgent } from '@openpanel/common/server';
import {
getProfileById,
@@ -194,16 +194,6 @@ async function handleTrack(
? `${projectId}:${payload.profileId}`
: undefined
: deviceId;
- const jobId = [
- slug(payload.name),
- timestamp.value,
- projectId,
- deviceId,
- groupId,
- ]
- .filter(Boolean)
- .join('-');
-
const promises: Promise<unknown>[] = [];
// If we have more than one property in the identity object, we should identify the user
@@ -231,7 +221,6 @@ async function handleTrack(
session,
},
groupId,
- jobId,
})
);