Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
1d0e520
docs: archive
VihasMakwana Jan 7, 2025
0b7f793
Merge branch 'main' into archive-docs
VihasMakwana Feb 25, 2025
4b48aab
[chore] - finalize tracker's implementation
VihasMakwana Feb 28, 2025
41dc51c
Merge branch 'main' into tracker-final
VihasMakwana Feb 28, 2025
c9a985e
lint
VihasMakwana Feb 28, 2025
d1d9099
Merge branch 'main' into tracker-final
VihasMakwana Feb 28, 2025
400479d
Merge branch 'main' into archive-docs
VihasMakwana Feb 28, 2025
9a102d0
skip on windows
VihasMakwana Feb 28, 2025
ec2bafb
Merge branch 'main' into tracker-final
VihasMakwana Mar 4, 2025
fcc86db
Merge branch 'main' into tracker-final
VihasMakwana Mar 4, 2025
e075279
Merge branch 'main' into tracker-final
VihasMakwana Mar 7, 2025
0eb153a
Merge branch 'main' into tracker-final
VihasMakwana Mar 7, 2025
e94be1e
Merge branch 'main' into tracker-final
VihasMakwana Mar 10, 2025
ddb279c
add readme and changelog
VihasMakwana Mar 10, 2025
2323f1d
Merge branch 'main' into tracker-final
VihasMakwana Mar 17, 2025
da29633
Merge branch 'main' into tracker-final
VihasMakwana Mar 17, 2025
07a6651
Merge branch 'main' into tracker-final
VihasMakwana Mar 18, 2025
f98fecc
Merge branch 'main' into tracker-final
VihasMakwana Mar 26, 2025
fa8c854
Merge branch 'main' into tracker-final
VihasMakwana Mar 28, 2025
cecb53e
nits
VihasMakwana Apr 1, 2025
34f9015
Merge branch 'archive-docs' into tracker-final
VihasMakwana Apr 1, 2025
a0e83d3
Merge branch 'main' into tracker-final
VihasMakwana Apr 1, 2025
3b65789
comments
VihasMakwana Apr 6, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add readme and changelog
  • Loading branch information
VihasMakwana committed Mar 10, 2025
commit ddb279cf32140374f4275d6cfccfc5dc621b448a
27 changes: 27 additions & 0 deletions .chloggen/fileconsumer-archive.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Use this changelog template to create an entry for release notes.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: enhancement

# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
component: filelogreceiver

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Add a new feature called "archive" to store offsets older than 3 poll cycles on disk.

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
issues: [38056]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext:

# If your change doesn't affect end users or the exported elements of any package,
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
# Optional: The change log or logs in which this entry should be included.
# e.g. '[user]' or '[user, api]'
# Include 'user' if the change is relevant to end users.
# Include 'api' if there is a change to a library API.
# Default: '[user]'
change_logs: []
2 changes: 1 addition & 1 deletion pkg/stanza/fileconsumer/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ type Config struct {
DeleteAfterRead bool `mapstructure:"delete_after_read,omitempty"`
IncludeFileRecordNumber bool `mapstructure:"include_file_record_number,omitempty"`
Compression string `mapstructure:"compression,omitempty"`
PollsToArchive int `mapstructure:"-"` // TODO: activate this config once archiving is set up
PollsToArchive int `mapstructure:"polls_to_archive,omitempty"`
AcquireFSLock bool `mapstructure:"acquire_fs_lock,omitempty"`
}

Expand Down
3 changes: 2 additions & 1 deletion receiver/filelogreceiver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ Tails and parses logs from files.
| `ordering_criteria.sort_by.format` | | Relevant if `sort_type` is set to `timestamp`. Defines the strptime format of the timestamp being sorted. |
| `ordering_criteria.sort_by.ascending` | | Sort direction |
| `compression` | | Indicate the compression format of input files. If set accordingly, files will be read using a reader that uncompresses the file before scanning its content. Options are `` or `gzip` |
| `polls_to_archive` | unset (`0`) | Enables [archiving](../../pkg/stanza/fileconsumer/design/archive.md). With archiving enabled, file offsets older than three poll cycles are stored on disk rather than being discarded |

Note that _by default_, no logs will be read from a file that is not actively being written to because `start_at` defaults to `end`.

Expand Down Expand Up @@ -211,7 +212,7 @@ For additional resiliency, see [Fault tolerant log collection example](../../exa
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 [fingerprint](../../pkg/stanza/fileconsumer/design/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
file log receiver continues reading the file (`Offset`).
- An arbitrary set of file attributes, such as the name of the file (`FileAttributes`).
Expand Down
Loading