Skip to content

Commit 91572d8

Browse files
committed
increase log expiration ttl to 1 year
1 parent 585fe2f commit 91572d8

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

apps/webapp/app/v3/eventRepository/clickhouseEventRepository.server.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ export class ClickhouseEventRepository implements IEventRepository {
158158
attributes: this.createEventToTaskEventV1InputAttributes(event.properties),
159159
metadata: this.createEventToTaskEventV1InputMetadata(event),
160160
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
162162
),
163163
},
164164
...this.spanEventsToTaskEventV1Input(event),
@@ -228,7 +228,7 @@ export class ClickhouseEventRepository implements IEventRepository {
228228
exception: spanEvent.properties.exception,
229229
}), // Events have no metadata
230230
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
232232
),
233233
};
234234
}
@@ -256,7 +256,7 @@ export class ClickhouseEventRepository implements IEventRepository {
256256
reason: spanEvent.properties.reason,
257257
}), // Events have no metadata
258258
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
260260
),
261261
};
262262
}
@@ -288,7 +288,7 @@ export class ClickhouseEventRepository implements IEventRepository {
288288
},
289289
metadata: JSON.stringify(spanEvent.properties),
290290
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
292292
),
293293
};
294294
}
@@ -314,7 +314,7 @@ export class ClickhouseEventRepository implements IEventRepository {
314314
attributes: {},
315315
metadata: JSON.stringify(unflattenAttributes(spanEvent.properties as Attributes)),
316316
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
318318
),
319319
};
320320
}
@@ -448,7 +448,7 @@ export class ClickhouseEventRepository implements IEventRepository {
448448
: undefined,
449449
metadata: JSON.stringify(metadata),
450450
// 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)),
452452
};
453453

454454
this._flushScheduler.addToBatch([event]);
@@ -549,7 +549,7 @@ export class ClickhouseEventRepository implements IEventRepository {
549549
: {},
550550
metadata: JSON.stringify(metadata),
551551
// 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)),
553553
};
554554

555555
const originalRunId =
@@ -586,7 +586,7 @@ export class ClickhouseEventRepository implements IEventRepository {
586586
}),
587587
// TODO: make sure configurable and by org
588588
expires_at: convertDateToClickhouseDateTime(
589-
new Date(Date.now() + 30 * 24 * 60 * 60 * 1000)
589+
new Date(Date.now() + 365 * 24 * 60 * 60 * 1000)
590590
),
591591
});
592592
}

0 commit comments

Comments
 (0)