diff --git a/consumer/pdata/log.go b/consumer/pdata/log.go index 8610f3adc2..3b25508ba6 100644 --- a/consumer/pdata/log.go +++ b/consumer/pdata/log.go @@ -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() } diff --git a/processor/batchprocessor/batch_processor.go b/processor/batchprocessor/batch_processor.go index 4374f4837e..dd6e468fc2 100644 --- a/processor/batchprocessor/batch_processor.go +++ b/processor/batchprocessor/batch_processor.go @@ -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. diff --git a/processor/batchprocessor/batch_processor_test.go b/processor/batchprocessor/batch_processor_test.go index 9a6b95ec3c..c51926d3ce 100644 --- a/processor/batchprocessor/batch_processor_test.go +++ b/processor/batchprocessor/batch_processor_test.go @@ -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()))