-
Notifications
You must be signed in to change notification settings - Fork 43
Update encoding noop #262
Update encoding noop #262
Conversation
…y-log-collection into update-encoding-noop
…y-log-collection into update-encoding-noop
Codecov Report
@@ Coverage Diff @@
## main #262 +/- ##
=====================================
Coverage 76.3% 76.3%
=====================================
Files 94 94
Lines 4434 4453 +19
=====================================
+ Hits 3386 3401 +15
- Misses 718 721 +3
- Partials 330 331 +1
|
operator/helper/multiline.go
Outdated
return 0, nil, nil | ||
} | ||
|
||
if atEOF && len(data) == 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since if !atEOF
returns, we don't need to check if atEOF
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
operator/helper/multiline_test.go
Outdated
} | ||
|
||
for _, tc := range testCases { | ||
splitFunc := SplitNone(100) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would make this a constant and tie tests to it. Equal to, slightly greater, much greater, etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added more tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This didn't really address what I was pointing out. The value 100
on this line should be a constant, because several of the tests depend on it. If we make it a constant, we can make the tests depend on the constant, which can then change without breaking tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added constant.
"simple", | ||
[]byte("testlog1"), | ||
func(t *testing.T, c chan *entry.Entry) { | ||
waitForMessage(t, c, "testlog1") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A really important part of this feature is that the resulting log body should be a []byte
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated to dump bytes on the emit func. Instead of decoding it, it just drops the bytes into the entry.
Cover all upstream configuration interface changes: - open-telemetry/opentelemetry-collector-contrib#5384 - open-telemetry/opentelemetry-collector-contrib#5541 - open-telemetry/opentelemetry-log-collection#262
Cover all upstream configuration interface changes: - open-telemetry/opentelemetry-collector-contrib#5384 - open-telemetry/opentelemetry-collector-contrib#5541 - open-telemetry/opentelemetry-log-collection#262
Resolves #138
Added
MaxLogSize
to some of the build function args to allow use of it within theSplitNone
function. this was to allow the function to respect max log size.