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

[WIP] Encoder drop additional fields #57

Open
wants to merge 26 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
2d9517e
Drop fields which are not in the protobuf definition
IngaFeick Jun 19, 2020
08b7ed8
Add test protobuf definition for test case encodePB3-g
IngaFeick Jun 19, 2020
4dc8e12
Remove debug statements
IngaFeick Jun 19, 2020
1f2b481
rename config option pb3_encoder_drop_unknown_fields
IngaFeick Jun 19, 2020
a3a6033
Fix test case encodePB3-f
IngaFeick Jun 19, 2020
508dfd7
Update documentation
IngaFeick Jun 19, 2020
e1bd3f5
Add flag to drop fields which are not in the protobuf definition
IngaFeick Jun 19, 2020
484cc49
Merge branch 'encoder_drop_additional_fields' of github.com:IngaFeick…
IngaFeick Jun 19, 2020
9987cc3
Restore old test case to previous functionality
IngaFeick Jun 19, 2020
897d5f3
Add test case for encoder
IngaFeick Sep 24, 2020
0ddda84
Implement new version of field discarding
IngaFeick Sep 29, 2020
b2bf356
Add test case for automatic discarding of fields
IngaFeick Sep 29, 2020
aa16582
PB3 encoder type conversion: ignore field names with reserved names
IngaFeick Sep 29, 2020
e862fa2
Finish implementation of pb3_encoder_drop_unknown_fields
IngaFeick Sep 30, 2020
5f2cc26
Change loglevel for type converter call
IngaFeick Sep 30, 2020
c25db66
Fix testcase encode-9; add two more encoder test cases
IngaFeick Oct 1, 2020
9249310
Fix testcase encode-9; add two more encoder test cases
IngaFeick Oct 1, 2020
cad5e73
Fix testcase encode-11
IngaFeick Oct 1, 2020
babdda7
Fix testcase encode-11
IngaFeick Oct 1, 2020
7d032ba
Fix testcase encode-11
IngaFeick Oct 1, 2020
d5f0e91
Fix protobuf definition for encoder test cases 10 + 11
IngaFeick Oct 1, 2020
373bb5d
Encoder spec: check if encode function has yielded an event
IngaFeick Oct 5, 2020
aa4e3c1
Add encoder test case 12
IngaFeick Nov 5, 2020
93e1ad3
remove debug output; explicit return nil to avoid returning @logger
IngaFeick Nov 5, 2020
160d8d5
Merge upstream
IngaFeick Oct 1, 2021
38276b5
Merge upstream 1.2.6 & 1.2.7 releases
IngaFeick Oct 5, 2021
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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 1.2.8
- Encoder: new flag to drop additional fields if not present in protobuf definition

## 1.2.7
- Syntax change for compatibility with newer versions of the google-protobuf gem

## 1.2.6
- [DOC] Fixed link format (from MD to asciidoc) [#61](https://github.com/logstash-plugins/logstash-codec-protobuf/pull/61)

Expand Down
9 changes: 9 additions & 0 deletions docs/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -239,3 +239,12 @@ Example values: for the protobuf definition
the field `[@metadata][pb_oneof][horse_type]` will be set to either `pegasus` or `unicorn`.
Available only for protobuf version 3.

[id="plugins-{type}s-{plugin}-pb3_encoder_drop_unknown_fields"]
===== `pb3_encoder_drop_unknown_fields`

* Value type is <<boolean,boolean>>
* Default value is true

The protobuf encoder should ignore fields which are present in the event but not in the protobuf definition. When setting this to false, invalid events will be discarded and an error will be logged.
Available only for protobuf version 3.

Loading