Skip to content

Commit

Permalink
[chore][receiver/filelog] Change plaintext name: filelog -> file log (#…
Browse files Browse the repository at this point in the history
…34984)

**Description:** <Describe what has changed.>
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
Updated the name of the file log receiver to be two words. Updated some
references as well where I thought it made sense, reviewers are welcome
to suggest changes.

**Link to tracking Issue:** <Issue number if applicable>
Resolves #34943
  • Loading branch information
crobert-1 authored Sep 4, 2024
1 parent 1ba4179 commit 33687ee
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions extension/storage/filestorage/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,12 @@ exporters:
## Replacing unsafe characters in component names

The extension uses the type and name of the component using the extension to create a file where the component's data is stored.
For example, if a Filelog receiver named `filelog/logs` uses the extension, its data is stored in a file named `receiver_filelog_logs`.
For example, if a file log receiver named `filelog/logs` uses the extension, its data is stored in a file named `receiver_filelog_logs`.

Sometimes the component name contains characters that either have special meaning in paths - like `/` - or are problematic or even forbidden in file names (depending on the host operating system), like `?` or `|`.
To prevent surprising or erroneous behavior, some characters in the component names are replaced before creating the file name to store data by the extension.

For example, for a Filelog receiver named `filelog/logs/container`, the component name `logs/container` is sanitized into `logs~007Econtainer` and the data is stored in a file named `receiver_filelog_logs~007Econtainer`.
For example, for a file log receiver named `filelog/logs/container`, the component name `logs/container` is sanitized into `logs~007Econtainer` and the data is stored in a file named `receiver_filelog_logs~007Econtainer`.

Every unsafe character is replaced with a tilde `~` and the character's [Unicode number][unicode_chars] in hex.
The only safe characters are: uppercase and lowercase ASCII letters `A-Z` and `a-z`, digits `0-9`, dot `.`, hyphen `-`, underscore `_`.
Expand Down
2 changes: 1 addition & 1 deletion pkg/stanza/docs/types/timestamp.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ As a special case, the [`time_parser`](../operators/time_parser.md) operator sup

### Example Configurations

The following examples use `filelog` receiver, but they also apply to other components that use the stanza libarary.
The following examples use file log receiver, but they also apply to other components that use the stanza libarary.

#### Parse timestamps from plain text logs

Expand Down
6 changes: 3 additions & 3 deletions receiver/filelogreceiver/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Filelog Receiver
# File Log Receiver

<!-- status autogenerated section -->
| Status | |
Expand Down Expand Up @@ -204,12 +204,12 @@ While the storage parameter can ensure that log files are consumed accurately, i
logs are dropped while moving downstream through other components in the collector.
For additional resiliency, see [Fault tolerant log collection example](../../examples/fault-tolerant-logs-collection/README.md)

Here is some of the information the `filelog` receiver stores:
Here is some of the information the file log receiver stores:
- The number of files it is currently tracking (`knownFiles`).
- For each file being tracked:
- The [fingerprint](../../pkg/stanza/fileconsumer/design.md#fingerprints) of the file (`Fingerprint.first_bytes`).
- The byte offset from the start of the file, indicating the position in the file from where the
`filelog` receiver continues reading the file (`Offset`).
file log receiver continues reading the file (`Offset`).
- An arbitrary set of file attributes, such as the name of the file (`FileAttributes`).

Exactly how this information is serialized depends on the type of storage being used.
Expand Down

0 comments on commit 33687ee

Please sign in to comment.