1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-12-16 00:11:27 +02:00

sdk/log: Add options to NewSimpleProcessor (#5185)

This commit is contained in:
Robert Pająk
2024-04-10 19:47:40 +02:00
committed by GitHub
parent 727f03e220
commit 054a63fef2
3 changed files with 19 additions and 14 deletions

View File

@@ -25,7 +25,7 @@ func TestNewBatchingConfig(t *testing.T) {
testcases := []struct {
name string
envars map[string]string
options []BatchingOption
options []BatchProcessorOption
want batchingConfig
}{
{
@@ -39,7 +39,7 @@ func TestNewBatchingConfig(t *testing.T) {
},
{
name: "Options",
options: []BatchingOption{
options: []BatchProcessorOption{
WithMaxQueueSize(10),
WithExportInterval(time.Microsecond),
WithExportTimeout(time.Hour),
@@ -69,7 +69,7 @@ func TestNewBatchingConfig(t *testing.T) {
},
{
name: "InvalidOptions",
options: []BatchingOption{
options: []BatchProcessorOption{
WithMaxQueueSize(-11),
WithExportInterval(-1 * time.Microsecond),
WithExportTimeout(-1 * time.Hour),
@@ -105,7 +105,7 @@ func TestNewBatchingConfig(t *testing.T) {
envarExpTimeout: strconv.Itoa(1000),
envarExpMaxBatchSize: strconv.Itoa(10),
},
options: []BatchingOption{
options: []BatchProcessorOption{
// These override the environment variables.
WithMaxQueueSize(3),
WithExportInterval(time.Microsecond),
@@ -121,7 +121,7 @@ func TestNewBatchingConfig(t *testing.T) {
},
{
name: "BatchLessThanOrEqualToQSize",
options: []BatchingOption{
options: []BatchProcessorOption{
WithMaxQueueSize(1),
WithExportMaxBatchSize(10),
},