1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/modules/otel-extensions-filestorage-extension.adoc

51 lines
2.2 KiB
Plaintext

// Module included in the following assemblies:
//
// * observability/otel/otel-collector/otel-collector-extensions.adoc
:_mod-docs-content-type: REFERENCE
[id="otel-extensions-filestorage-extension_{context}"]
= File Storage Extension
[role="_abstract"]
The File Storage Extension supports traces, metrics, and logs. This extension can persist the state to the local file system. This extension persists the sending queue for the OpenTelemetry Protocol (OTLP) exporters that are based on the HTTP and the gRPC protocols. This extension requires the read and write access to a directory. This extension can use a default directory, but the default directory must already exist.
:FeatureName: The File Storage Extension
include::snippets/technology-preview.adoc[]
.OpenTelemetry Collector custom resource with a configured File Storage Extension that persists an OTLP sending queue
[source,yaml]
----
# ...
config:
extensions:
file_storage/all_settings:
directory: /var/lib/otelcol/mydir # <1>
timeout: 1s # <2>
compaction:
on_start: true # <3>
directory: /tmp/ # <4>
max_transaction_size: 65_536 # <5>
fsync: false # <6>
exporters:
otlp:
sending_queue:
storage: file_storage/all_settings # <7>
service:
extensions: [file_storage/all_settings] # <8>
pipelines:
traces:
receivers: [otlp]
exporters: [otlp]
# ...
----
<1> Specifies the directory in which the telemetry data is stored.
<2> Specifies the timeout time interval for opening the stored files.
<3> Starts compaction when the Collector starts. If omitted, the default is `+false+`.
<4> Specifies the directory in which the compactor stores the telemetry data.
<5> Defines the maximum size of the compaction transaction. To ignore the transaction size, set to zero. If omitted, the default is `+65536+` bytes.
<6> When set, forces the database to perform an `fsync` call after each write operation. This helps to ensure database integrity if there is an interruption to the database process, but at the cost of performance.
<7> Buffers the OTLP Exporter data on the local file system.
<8> Starts the File Storage Extension by the Collector.