Does Loki perform bad when cardinality of the 'filename' label is high

In my case, some logs are named like this xxxxx.2023050401.log.
Our application will create a new log file every hour. Eventually, the “filename” label becomes a dynamic label with unbounded values.

You have two options:

  1. Remove the filename label on ingestion, if you don’t care about knowing the file name.

  2. Parse the file name, and extract the xxxxx part, and use that as file name (essentially get rid of the date part).