Rename pdata.Logs.SizeBytes to Size, consistent with metrics/traces (#2694)

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
This commit is contained in:
Bogdan Drutu 2021-03-17 15:21:25 -07:00 committed by GitHub
parent 9b1db770b3
commit 85804ff257
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 5 deletions

View File

@ -91,9 +91,8 @@ func (ld Logs) LogRecordCount() int {
return logCount
}
// SizeBytes returns the number of bytes in the internal representation of the
// logs.
func (ld Logs) SizeBytes() int {
// Size returns the number of bytes in the internal representation of the logs.
func (ld Logs) Size() int {
return ld.orig.Size()
}

View File

@ -340,7 +340,7 @@ func (bm *batchLogs) itemCount() uint32 {
}
func (bm *batchLogs) size() int {
return bm.logData.SizeBytes()
return bm.logData.Size()
}
// resets the current batchLogs structure with zero/empty values.

View File

@ -558,7 +558,7 @@ func TestBatchLogProcessor_BatchSize(t *testing.T) {
size := 0
for requestNum := 0; requestNum < requestCount; requestNum++ {
ld := testdata.GenerateLogDataManyLogsSameResource(logsPerRequest)
size += ld.SizeBytes()
size += ld.Size()
assert.NoError(t, batcher.ConsumeLogs(context.Background(), ld))
}
require.NoError(t, batcher.Shutdown(context.Background()))