You've already forked opentelemetry-go
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:
@@ -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),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user