Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move to pyproject.toml. Add processors, documentation updates. #26

Merged
merged 12 commits into from
Jul 14, 2023

Conversation

hcpadkins
Copy link
Contributor

Overview

Please note: This makes a minor change to the structure of arguments passed to output plugins. If using a custom output plugin, this may constitute a breaking change. A subsequent version increment has not been performed as the stable v1.0.0 release has not yet been cut.

This pull-request moves Grove to use pyproject.toml, and adds processors into the public Grove release.

These optional and chainable processors allow processing of collected log entries before output. Out of the box this feature can be used to transform logs into a consistent schema, split, or filter events. Similar to other backends, plugins can be developed to introduce new processors.

These processors may be used for filtering, transformation, or even performing enrichment during collection.

In line with this, a new output configuration option has been introduced which allows controlling which "stream" of log data to output. This allows for both raw log entries and processed data to be output, or some combination thereof. This has been configured to adhere to the existing defaults, allowing backwards compatibility with existing configuration.

Finally, this pull-request also adds a local secret handler for completeness, and updates the documentation ready for the official v1.0.0 release.

@hcpadkins hcpadkins requested a review from a team as a code owner July 10, 2023 13:03
By default both a processed and raw output stream are configured to simplify configuration. However, this means that if no processors are used logs will be written twice. This pull-request prevents that, and instead only write out data if processors are configured.
cugu
cugu previously approved these changes Jul 14, 2023
Copy link
Contributor

@cugu cugu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great PR! Processors are gonna improve Grove quite a lot.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
grove/outputs/__init__.py Outdated Show resolved Hide resolved
@hcpadkins hcpadkins requested a review from cugu July 14, 2023 12:29
@hcpadkins hcpadkins merged commit 44aea31 into hashicorp-forge:main Jul 14, 2023
4 checks passed
@hcpadkins hcpadkins deleted the feature/processors branch July 14, 2023 12:35
hcpadkins added a commit to hcpadkins/grove that referenced this pull request Jul 24, 2023
…corp-forge#26)

* Add processors. Move to pyproject.toml.

* Cache calls to quote_aware_split.

* Update processor base class to allow finalize only

This was possible prior to this commit, but required a stub method for process to be implemented.

* Add local file secret backend.

* Remove caching to prevent unexpected mutation.

* Documentation updates.

* Version bump for new release.

* Update build process for pyproject.toml

* Only write processed data if processors are configured.

By default both a processed and raw output stream are configured to simplify configuration. However, this means that if no processors are used logs will be written twice. This pull-request prevents that, and instead only write out data if processors are configured.

* Fix up logger error.

* Update grove/outputs/__init__.py

Co-authored-by: Jonas Plum <[email protected]>

* Address pull-request comments.

---------

Co-authored-by: Jonas Plum <[email protected]>
hcpadkins added a commit to hcpadkins/grove that referenced this pull request Jul 24, 2023
…corp-forge#26)

* Add processors. Move to pyproject.toml.

* Cache calls to quote_aware_split.

* Update processor base class to allow finalize only

This was possible prior to this commit, but required a stub method for process to be implemented.

* Add local file secret backend.

* Remove caching to prevent unexpected mutation.

* Documentation updates.

* Version bump for new release.

* Update build process for pyproject.toml

* Only write processed data if processors are configured.

By default both a processed and raw output stream are configured to simplify configuration. However, this means that if no processors are used logs will be written twice. This pull-request prevents that, and instead only write out data if processors are configured.

* Fix up logger error.

* Update grove/outputs/__init__.py

Co-authored-by: Jonas Plum <[email protected]>

* Address pull-request comments.

---------

Co-authored-by: Jonas Plum <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants