feat(aggregation): ✨ Add sessionId extraction and propagation logic for session correlation in AggregationService
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
parent
8d86bfd1b7
commit
18d0d424fb
1 changed files with 8 additions and 1 deletions
|
|
@ -54,7 +54,14 @@ export class AggregationService implements OnModuleDestroy {
|
|||
}
|
||||
|
||||
async processEvent(event: ProcessableEvent): Promise<void> {
|
||||
const { eventType, timestamp, userId, properties } = event;
|
||||
const { eventType, timestamp, sessionId, userId, properties } = event;
|
||||
|
||||
// Synthetic canary events (quinn-analytics-canary.timer) exist to prove
|
||||
// the tracker→edge→relay→collector→raw_events chain end-to-end. They must
|
||||
// reach raw_events (that IS the proof) but never count toward metrics.
|
||||
if (sessionId?.startsWith('canary-')) {
|
||||
return;
|
||||
}
|
||||
|
||||
const hourBucket = this.getTimeBucket(timestamp, TimeGranularity.HOUR);
|
||||
const dayBucket = this.getTimeBucket(timestamp, TimeGranularity.DAY);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue