Skip to content

Commit 8560a24

Browse files
mage otel:readme
1 parent 5bf3928 commit 8560a24

File tree

1 file changed

+0
-52
lines changed

1 file changed

+0
-52
lines changed

internal/pkg/otel/README.md

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -80,56 +80,4 @@ This section provides a summary of components included in the Elastic Distributi
8080
| Component | Version |
8181
|---|---|
8282
| [signaltometricsconnector](https://github.com/elastic/opentelemetry-collector-components/blob/connector/signaltometricsconnector/v0.2.1/connector/signaltometricsconnector/README.md) | v0.2.1 |
83-
<<<<<<< HEAD
84-
| [spanmetricsconnector](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/connector/spanmetricsconnector/v0.111.0/connector/spanmetricsconnector/README.md) | v0.111.0 |
85-
=======
8683
| [spanmetricsconnector](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/connector/spanmetricsconnector/v0.112.0/connector/spanmetricsconnector/README.md) | v0.112.0 |
87-
## Persistence in OpenTelemetry Collector
88-
89-
By default, the OpenTelemetry Collector is stateless, which means it doesn't store offsets on disk while reading files. As a result, if you restart the collector, it won't retain the last read offset, potentially leading to data duplication or loss. However, we have configured persistence in the settings provided with the Elastic Agent package.
90-
91-
To enable persistence for the `filelogreceiver`, we add the `file_storage` extension and activate it for `filelog`.
92-
Execute `export STATE_PATH=/path/to/store/otel/offsets` and use the following configuration to enable persistence:
93-
94-
```yaml
95-
receivers:
96-
filelog/platformlogs:
97-
include: [ /var/log/system.log ]
98-
start_at: beginning
99-
storage: file_storage/filelogreceiver
100-
extensions:
101-
file_storage/filelogreceiver:
102-
directory: ${env:STATE_PATH}
103-
create_directory: true
104-
exporters:
105-
...
106-
processors:
107-
...
108-
service:
109-
extensions: [file_storage]
110-
pipelines:
111-
logs/platformlogs:
112-
receivers: [filelog/platformlogs]
113-
processors: [...]
114-
exporters: [...]
115-
```
116-
117-
> [!WARNING]
118-
Removing the storage key from the filelog section will disable persistence, which will lead to data duplication or loss when the collector restarts.
119-
120-
> [!IMPORTANT]
121-
If you remove the `create_directory: true` option, you'll need to manually create a directory to store the data. You can ignore this option if the directory already exists.
122-
123-
### Persistence in standalone Docker mode
124-
125-
By default, when running Elastic Distribution for OpenTelemetry Collector in Docker, checkpoints are stored in `/usr/share/elastic-agent/otel_registry` by default. To ensure data persists across container restarts, you can use the following command:
126-
127-
```bash
128-
docker run --rm -ti --entrypoint="elastic-agent" --mount type=bind,source=/path/on/host,target=/usr/share/elastic-agent/otel_registry docker.elastic.co/beats/elastic-agent:9.0.0-SNAPSHOT otel
129-
```
130-
131-
### Known issues:
132-
- You face following `failed to build extensions: failed to create extension "file_storage/filelogreceiver": mkdir ...: permission denied` error while running the otel mode
133-
- Cause: This issue is likely because the user running the executable lacks sufficient permissions to create the directory.
134-
- Resolution: You can either create the directory manually or specify a path with necessary permissions.
135-
>>>>>>> bf81188673 (Update OTel components to v0.112.0/v1.18.0 (#5838))

0 commit comments

Comments
 (0)