@@ -158,7 +158,7 @@ export class ClickhouseEventRepository implements IEventRepository {
158
158
attributes : this . createEventToTaskEventV1InputAttributes ( event . properties ) ,
159
159
metadata : this . createEventToTaskEventV1InputMetadata ( event ) ,
160
160
expires_at : convertDateToClickhouseDateTime (
161
- new Date ( Date . now ( ) + 30 * 24 * 60 * 60 * 1000 ) // TODO: make sure configurable and by org
161
+ new Date ( Date . now ( ) + 365 * 24 * 60 * 60 * 1000 ) // 1 year
162
162
) ,
163
163
} ,
164
164
...this . spanEventsToTaskEventV1Input ( event ) ,
@@ -228,7 +228,7 @@ export class ClickhouseEventRepository implements IEventRepository {
228
228
exception : spanEvent . properties . exception ,
229
229
} ) , // Events have no metadata
230
230
expires_at : convertDateToClickhouseDateTime (
231
- new Date ( Date . now ( ) + 30 * 24 * 60 * 60 * 1000 ) // TODO: make sure configurable and by org
231
+ new Date ( Date . now ( ) + 365 * 24 * 60 * 60 * 1000 ) // 1 year
232
232
) ,
233
233
} ;
234
234
}
@@ -256,7 +256,7 @@ export class ClickhouseEventRepository implements IEventRepository {
256
256
reason : spanEvent . properties . reason ,
257
257
} ) , // Events have no metadata
258
258
expires_at : convertDateToClickhouseDateTime (
259
- new Date ( Date . now ( ) + 30 * 24 * 60 * 60 * 1000 ) // TODO: make sure configurable and by org
259
+ new Date ( Date . now ( ) + 365 * 24 * 60 * 60 * 1000 ) // 1 year
260
260
) ,
261
261
} ;
262
262
}
@@ -288,7 +288,7 @@ export class ClickhouseEventRepository implements IEventRepository {
288
288
} ,
289
289
metadata : JSON . stringify ( spanEvent . properties ) ,
290
290
expires_at : convertDateToClickhouseDateTime (
291
- new Date ( Date . now ( ) + 30 * 24 * 60 * 60 * 1000 ) // TODO: make sure configurable and by org
291
+ new Date ( Date . now ( ) + 365 * 24 * 60 * 60 * 1000 ) // 1 year
292
292
) ,
293
293
} ;
294
294
}
@@ -314,7 +314,7 @@ export class ClickhouseEventRepository implements IEventRepository {
314
314
attributes : { } ,
315
315
metadata : JSON . stringify ( unflattenAttributes ( spanEvent . properties as Attributes ) ) ,
316
316
expires_at : convertDateToClickhouseDateTime (
317
- new Date ( Date . now ( ) + 30 * 24 * 60 * 60 * 1000 ) // TODO: make sure configurable and by org
317
+ new Date ( Date . now ( ) + 365 * 24 * 60 * 60 * 1000 ) // 1 year
318
318
) ,
319
319
} ;
320
320
}
@@ -448,7 +448,7 @@ export class ClickhouseEventRepository implements IEventRepository {
448
448
: undefined ,
449
449
metadata : JSON . stringify ( metadata ) ,
450
450
// TODO: make sure configurable and by org
451
- expires_at : convertDateToClickhouseDateTime ( new Date ( Date . now ( ) + 30 * 24 * 60 * 60 * 1000 ) ) ,
451
+ expires_at : convertDateToClickhouseDateTime ( new Date ( Date . now ( ) + 365 * 24 * 60 * 60 * 1000 ) ) ,
452
452
} ;
453
453
454
454
this . _flushScheduler . addToBatch ( [ event ] ) ;
@@ -549,7 +549,7 @@ export class ClickhouseEventRepository implements IEventRepository {
549
549
: { } ,
550
550
metadata : JSON . stringify ( metadata ) ,
551
551
// TODO: make sure configurable and by org
552
- expires_at : convertDateToClickhouseDateTime ( new Date ( Date . now ( ) + 30 * 24 * 60 * 60 * 1000 ) ) ,
552
+ expires_at : convertDateToClickhouseDateTime ( new Date ( Date . now ( ) + 365 * 24 * 60 * 60 * 1000 ) ) ,
553
553
} ;
554
554
555
555
const originalRunId =
@@ -586,7 +586,7 @@ export class ClickhouseEventRepository implements IEventRepository {
586
586
} ) ,
587
587
// TODO: make sure configurable and by org
588
588
expires_at : convertDateToClickhouseDateTime (
589
- new Date ( Date . now ( ) + 30 * 24 * 60 * 60 * 1000 )
589
+ new Date ( Date . now ( ) + 365 * 24 * 60 * 60 * 1000 )
590
590
) ,
591
591
} ) ;
592
592
}
0 commit comments