Delete traces to save storage

Is there a way to delete traces to save storage ? Would like to get rid of selected traces to save space. Don’t want to use the block retention as it would delete any traces that are aging out.

There is not. There would be a few ways to go about this depending on what you wanted. One would be to add some functionality to the compactor to drop X% of traces after a given number of days.

Technically right now you could:

  • delete some older blocks
  • delete the tenant index /<tenant>/index.json.gz
  • roll compactors/queriers/query-frontends

You have to delete the tenant index and roll those components so their view of the backend is updated to no longer list the missing blocks.

Actually I think Tempo will naturally just delete blocks if you rename meta.jsoncompacted.meta.json. So you could do this on some percentage of your blocks to reduce long term storage.

thanks for the reply, if i want to delete the blocks, is there a mapping of traceids to blocks ? want to make sure am not deleting a trace that i would want to persist.