remove reqid and user agent
This commit is contained in:
@@ -40,8 +40,6 @@ async function main() {
|
||||
properties: {
|
||||
hash: 'test-hash',
|
||||
'query.utm_source': 'test',
|
||||
__reqId: `req_${Math.floor(Math.random() * 1000)}`,
|
||||
__user_agent: 'Mozilla/5.0 (Test)',
|
||||
},
|
||||
created_at: formatClickhouseDate(eventTime),
|
||||
country: 'US',
|
||||
|
||||
@@ -65,7 +65,6 @@ export async function createSessionEnd(
|
||||
const logger = baseLogger.child({
|
||||
payload,
|
||||
jobId: job.id,
|
||||
reqId: payload.properties?.__reqId ?? 'unknown',
|
||||
});
|
||||
|
||||
logger.debug('Processing session end job');
|
||||
|
||||
@@ -93,7 +93,6 @@ export async function incomingEvent(
|
||||
...properties,
|
||||
__hash: hash,
|
||||
__query: query,
|
||||
__reqId: reqId,
|
||||
}),
|
||||
createdAt,
|
||||
duration: 0,
|
||||
|
||||
@@ -101,8 +101,6 @@ describe('incomingEvent', () => {
|
||||
properties: {
|
||||
__hash: undefined,
|
||||
__query: undefined,
|
||||
__user_agent: jobData.headers['user-agent'],
|
||||
__reqId: jobData.headers['request-id'],
|
||||
},
|
||||
createdAt: timestamp,
|
||||
country: 'US',
|
||||
@@ -207,8 +205,6 @@ describe('incomingEvent', () => {
|
||||
properties: {
|
||||
__hash: undefined,
|
||||
__query: undefined,
|
||||
__user_agent: jobData.headers['user-agent'],
|
||||
__reqId: jobData.headers['request-id'],
|
||||
},
|
||||
createdAt: timestamp,
|
||||
country: 'US',
|
||||
@@ -297,8 +293,6 @@ describe('incomingEvent', () => {
|
||||
projectId,
|
||||
properties: {
|
||||
custom_property: 'test_value',
|
||||
__user_agent: 'OpenPanel Server/1.0',
|
||||
__reqId: '123',
|
||||
__hash: undefined,
|
||||
__query: undefined,
|
||||
},
|
||||
@@ -364,8 +358,6 @@ describe('incomingEvent', () => {
|
||||
projectId,
|
||||
properties: {
|
||||
custom_property: 'test_value',
|
||||
__user_agent: 'OpenPanel Server/1.0',
|
||||
__reqId: '123',
|
||||
__hash: undefined,
|
||||
__query: undefined,
|
||||
},
|
||||
|
||||
@@ -119,7 +119,6 @@ export async function getSessionEndJob(args: {
|
||||
jobTimestamp: new Date(job.timestamp).toISOString(),
|
||||
jobDelta: Date.now() - job.timestamp,
|
||||
jobId: job.id,
|
||||
reqId: job.data.payload.properties?.__reqId ?? 'unknown',
|
||||
payload: job.data.payload,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -153,8 +153,6 @@ export interface IServiceEvent {
|
||||
properties: Record<string, unknown> & {
|
||||
hash?: string;
|
||||
query?: Record<string, unknown>;
|
||||
__reqId?: string;
|
||||
__user_agent?: string;
|
||||
};
|
||||
createdAt: Date;
|
||||
country?: string | undefined;
|
||||
|
||||
Reference in New Issue
Block a user