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