Extensions – File storage
The file storage extension can be used to configure a sending queue in the exporters that ensures all logs are stored on the disk while the backend is not available. It is recommended to use this extension to prevent data loss in case of outages that affect the collector directly (See collector resiliency):
extensions:
# Name of the header with the bearer token (Case sensitive!) file_storage/server: # File storage extension with the unique name 'server'
fsync: true # Ensure data integrity on each write
exporters:
otlphttp/server: # OTLPHTTP exporter uses HTTP Protobuf by default endpoint: "https://backendhost:4318" # Target URL to export OTLP
headers: {"authorization": "Bearer ****************"} # API key to access the log backend tls:
ca_file: [PATH TO CERTIFICATE] # CA public certificate of the log backend sending_queue: # Queue logs in case logs cannot be exported to the backend
storage: file_storage/server
block_on_overflow : true # Blocking is used to ensure the system stops working if logs cannot be created.
retry_on_failure: # Additional retry options when logs cannot be exported to the backend max_elapsed_time: 0 # Disable max elapsed time to allow retries indefinitely