We're using latest loki, but confused how to define the retention properly:
What is the difference between:
What takes the priority?
In the example below, will the data be deleted after 168h or 336h?
limits_config:
enforce_metric_name: false
reject_old_samples: true
reject_old_samples_max_age: 168h
max_cache_freshness_per_query: 10m
retention_period: 336h
Data will be deleted after 336h because the "retention_period" parameter defines that. The "reject_old_samples" (true or false) and "reject_old_samples_max_age" parameters are related to if old log entries received by Loki should or shouldn't be accepted by the tool and how old these log entries can be and still be accepted.
See more information about the Loki configuration here.