TTLs - applying different TTL based on traces attributes #10403
BrokenSwing
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I've seen in the settings that we can define different TTLs for metrics/logs/traces.
However it would be really helpful to be able apply different TTLs based on same attributes.
My use case:
I'm emitting traces for most things that happen in my service.
I'm running a booking service. Users can add items (nights) in their cart and then book them (pay).
Carts can expire so I have a cron job which restocks expired carts every minute. I get a trace for each run.
I also have a trace when the user pays for their booking.
The thing is: for traces related to restocking expired cart I'm okay to keep them only for a short time (e.g. 3 days). While traces related to payment I would prefer keeping them for 15 days. And maybe keep all other traces for 7 days for e.g.
Would it be possible to add this capability? IMHO no need for a very complicated filter support, could simply be a "category" or "signoz.ttl" property attached to the trace which is emmited by the client.
For the "category" solution: In the TTL UI we could define category "cron" is 3 day TTL, category "paiement" is 15 days TTL and default is 7 day. Then in my service I attached the property "signoz.ttl.category" which is a string matching one of predefined categories.
For the "signoz.ttl" it would be to be able to specify directly in the trace properties the desired TTL.
Both suits me. For enterprise it would be certainly be better to have the category-based one as it gives better control for operational teams.
Another side note, could be really nice too to be able to extend TTL for error traces compared to success traces.
Beta Was this translation helpful? Give feedback.
All reactions