Excluding tags on a spessific output plugin

Hi

I want to exclude tag on a spessific output. So let sey i have a output to file that look like this

[[outputs.file]]
  files = ["/data/raw/imu.json"]
  rotation_interval = "1h"
  rotation_max_archives = -1
  data_format = "json"

in the actual file i get result like this

{"fields":{"value":30.85414165613187},"name":"raw__mqtt_sensors","tags":{"deviceid":"001","host":"telegraf","measurement_type":"sensor","topic":"test/001/sensors","ts":"1691495762465"},"timestamp":1691495761}

Under the tags field I get the key name “ts”. I dont want this tag to be written to file. How do I drop this tag when writing to file output. for other outputs I want this tag. The drop statment should only be for this spessific output.

Thanks

See metric filtering, specifically tagexclude:

tagexclude = ["ts"]