Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@cosmo0920 Thanks for the work on fluent-bit-go
I made a little branch with a couple of other minor tweaks.
Dump go version, and update the dependency
go 1.20
github.com/ugorji/go/codec
Verify timestamp without reflection
To verify the timestamp is being decoded correctly added a extractTimeStamp() function to extract the time without using reflection.
More test data
Also tried to add another test input, and this actually fails. I believe the input data is valid, because I extracted it from my running version of fluentbit. Have I just made a coding error, or has it found a real issue? I added some log lines, and the input data looks ok-ish.
`das@t:~/Downloads/fluent-bit-go/output$ ~/Downloads/msgpack-inspect ./testdata/data | more
header: "0xdd"
length: 2
children:
header: "0xdd"
length: 2
children:
header: "0xd7"
exttype: 0
length: 8
data: "0x64b579fd24b76a00"
header: "0x80"
length: 0
children: []
header: "0xde"
length: 43
children:
format: "fixstr"
header: "0xa4"
length: 4`
Thanks in advance