I am exporting traces and logs to a json file as below using Open Telemetry. The problem here is, the file is increasing day by day on the container. Is there a way we can limit the file size to 10 MB in the below configuration?
exporters:
# Data sources: traces, metrics, logs
file:
path: ./filename.json
In docker, we have the option to do this like below. Is there a similar option to do it in the opentelemetry exporter?
logging:
driver: "json-file"
options:
max-size: "2m"
max-file: "10"
labels: "collector"
env: "test"