-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[pkg/stanza] Option for setting max log size in syslog parser (#33777)
**Description:** add `MaxLogSize` parameter to `syslog` parser. Note that for this option to be available, `enable_octet_counting` needs to be set to `true`, as this is an option that is exclusive to the `octetcounting` parser in the [syslog library](github.com/leodido/go-syslog). One aspect where I'm not sure about yet is regarding the placement of the `max_log_size` option: Right now, this option is also set within the `TCP` input configuration, whereas this new option would be one layer above, i.e. in the syslog base config. This would mean that this option could potentially be set to different values in the parser and tcp input config like for example: ``` receivers: syslog: protocol: rfc5424 enable_octet_counting: true max_log_size: 200000000 # 200MiB tcp: listen_address: :4278 max_log_size: 100000000 # 100MiB exporters: debug: service: pipelines: logs: receivers: [syslog] exporters: [debug] ``` For now I have implemented this in a way where if nothing is set if the tcp input config, the max_log_size value from the syslog base config will be used. If set in the tcp config, the tcp input will use that more specific value. To me this makes the most sense right now, but I appreciate any feedback on this. **Link to tracking Issue:** #33182 **Testing:** so far added unit test for the syslog parser, will also add some tests for the syslog input config to test the behavior described above. **Documentation:** TODO, will add once we have figured out all open questions --------- Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
- Loading branch information
Showing
6 changed files
with
91 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: bug_fix | ||
|
||
# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver) | ||
component: syslogreceiver | ||
|
||
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). | ||
note: "Allow to define `max_octets` for octet counting RFC5424 syslog parser" | ||
|
||
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. | ||
issues: [33182] | ||
|
||
# (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: [user] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters