Annotation retention period?


Annotation is a nice feature in grafana. But after checking the table in database, a question is raised.
How can we set a rention period for annotaion records?

The data type of id is interger, so it’s highly possible that you will receive a gift from Euler. :slight_smile:
In django, you will get something like IntegrityError: (1062, “Duplicate entry ‘2147483647’ for key ‘PRIMARY’”)

Maybe it will be better to provide a paramter in grafana-cli.

There is only one way to remove internal grafana (alert) annotations and that is from the alert tab.

We need to build a cleanup / retention system, and a way to handle id overflow.

Thanks. “Clear History” button removes db records actually.
Looking forward to this cleanup / retension feature.