From 2f1f7905bb6f01d82213da27f81b2f030e4373cd Mon Sep 17 00:00:00 2001 From: Daniel Jaglowski Date: Mon, 4 Nov 2024 15:28:19 -0500 Subject: [PATCH] [chore][connector/routing] Migrate logs tests to concise form (#36158) Follows https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/36150 Finishes migrating logs tests to new concise format. Also includes minor nonfunctional refactoring in metrics test to match what was needed for logs. --- connector/routingconnector/config_test.go | 28 + connector/routingconnector/go.mod | 2 +- connector/routingconnector/logs_test.go | 516 +++++++++++++++--- connector/routingconnector/metrics_test.go | 81 +-- connector/routingconnector/request_test.go | 31 +- .../routingconnector/testdata/logs/input.yaml | 141 ----- .../all_match_first_only/config.yaml | 13 - .../all_match_first_only/sink_0.yaml | 141 ----- .../all_match_last_only/config.yaml | 13 - .../all_match_last_only/sink_1.yaml | 141 ----- .../match_none_with_default/config.yaml | 13 - .../match_none_with_default/sink_default.yaml | 141 ----- .../match_none_without_default/config.yaml | 12 - .../some_match_each_route/config.yaml | 13 - .../some_match_each_route/sink_0.yaml | 53 -- .../some_match_each_route/sink_1.yaml | 53 -- .../some_match_each_route/sink_default.yaml | 105 ---- .../config.yaml | 13 - .../sink_0.yaml | 41 -- .../sink_default.yaml | 111 ---- .../with_resource_condition/config.yaml | 13 - .../with_resource_condition/sink_0.yaml | 71 --- .../with_resource_condition/sink_default.yaml | 71 --- .../with_scope_condition/config.yaml | 13 - .../with_scope_condition/sink_0.yaml | 81 --- .../with_scope_condition/sink_default.yaml | 81 --- .../match_logs_then_grpc_request/config.yaml | 13 - .../match_logs_then_grpc_request/request.yaml | 2 - .../match_logs_then_grpc_request/sink_0.yaml | 105 ---- .../match_logs_then_grpc_request/sink_1.yaml | 105 ---- .../match_logs_then_http_request/config.yaml | 13 - .../match_logs_then_http_request/request.yaml | 2 - .../match_logs_then_http_request/sink_0.yaml | 105 ---- .../match_logs_then_http_request/sink_1.yaml | 105 ---- .../match_logs_then_resource/config.yaml | 13 - .../match_logs_then_resource/sink_0.yaml | 105 ---- .../match_logs_then_resource/sink_1.yaml | 53 -- .../sink_default.yaml | 53 -- .../config.yaml | 13 - .../request.yaml | 2 - .../sink_0.yaml | 72 --- .../sink_1.yaml | 71 --- .../config.yaml | 13 - .../request.yaml | 2 - .../sink_0.yaml | 72 --- .../sink_1.yaml | 71 --- .../match_resource_then_logs/config.yaml | 13 - .../match_resource_then_logs/sink_0.yaml | 71 --- .../match_resource_then_logs/sink_1.yaml | 53 -- .../sink_default.yaml | 53 -- .../match_any_value/config.yaml | 9 - .../match_any_value/request.yaml | 4 - .../match_any_value/sink_0.yaml | 141 ----- .../match_grpc_value/config.yaml | 9 - .../match_grpc_value/request.yaml | 2 - .../match_grpc_value/sink_0.yaml | 141 ----- .../match_http_value/config.yaml | 9 - .../match_http_value/request.yaml | 2 - .../match_http_value/sink_0.yaml | 141 ----- .../match_http_value2/config.yaml | 9 - .../match_http_value2/request.yaml | 2 - .../match_http_value2/sink_0.yaml | 141 ----- .../match_no_grpc_value/config.yaml | 9 - .../match_no_grpc_value/request.yaml | 2 - .../match_no_grpc_value/sink_default.yaml | 141 ----- .../match_no_http_value/config.yaml | 9 - .../match_no_http_value/request.yaml | 2 - .../match_no_http_value/sink_default.yaml | 141 ----- .../no_request_values/config.yaml | 9 - .../no_request_values/sink_default.yaml | 141 ----- .../all_match_first_only/config.yaml | 10 - .../all_match_first_only/sink_0.yaml | 141 ----- .../all_match_last_only/config.yaml | 10 - .../all_match_last_only/sink_1.yaml | 141 ----- .../all_match_once/config.yaml | 11 - .../all_match_once/sink_0.yaml | 141 ----- .../each_matches_one/config.yaml | 10 - .../each_matches_one/sink_0.yaml | 71 --- .../each_matches_one/sink_1.yaml | 71 --- .../match_none_with_default/config.yaml | 10 - .../match_none_with_default/sink_default.yaml | 141 ----- .../match_none_without_default/config.yaml | 10 - connector/routingconnector/traces_test.go | 9 +- 83 files changed, 525 insertions(+), 4487 deletions(-) delete mode 100644 connector/routingconnector/testdata/logs/input.yaml delete mode 100644 connector/routingconnector/testdata/logs/log_context/all_match_first_only/config.yaml delete mode 100644 connector/routingconnector/testdata/logs/log_context/all_match_first_only/sink_0.yaml delete mode 100644 connector/routingconnector/testdata/logs/log_context/all_match_last_only/config.yaml delete mode 100644 connector/routingconnector/testdata/logs/log_context/all_match_last_only/sink_1.yaml delete mode 100644 connector/routingconnector/testdata/logs/log_context/match_none_with_default/config.yaml delete mode 100644 connector/routingconnector/testdata/logs/log_context/match_none_with_default/sink_default.yaml delete mode 100644 connector/routingconnector/testdata/logs/log_context/match_none_without_default/config.yaml delete mode 100644 connector/routingconnector/testdata/logs/log_context/some_match_each_route/config.yaml delete mode 100644 connector/routingconnector/testdata/logs/log_context/some_match_each_route/sink_0.yaml delete mode 100644 connector/routingconnector/testdata/logs/log_context/some_match_each_route/sink_1.yaml delete mode 100644 connector/routingconnector/testdata/logs/log_context/some_match_each_route/sink_default.yaml delete mode 100644 connector/routingconnector/testdata/logs/log_context/with_resource_and_scope_conditions/config.yaml delete mode 100644 connector/routingconnector/testdata/logs/log_context/with_resource_and_scope_conditions/sink_0.yaml delete mode 100644 connector/routingconnector/testdata/logs/log_context/with_resource_and_scope_conditions/sink_default.yaml delete mode 100644 connector/routingconnector/testdata/logs/log_context/with_resource_condition/config.yaml delete mode 100644 connector/routingconnector/testdata/logs/log_context/with_resource_condition/sink_0.yaml delete mode 100644 connector/routingconnector/testdata/logs/log_context/with_resource_condition/sink_default.yaml delete mode 100644 connector/routingconnector/testdata/logs/log_context/with_scope_condition/config.yaml delete mode 100644 connector/routingconnector/testdata/logs/log_context/with_scope_condition/sink_0.yaml delete mode 100644 connector/routingconnector/testdata/logs/log_context/with_scope_condition/sink_default.yaml delete mode 100644 connector/routingconnector/testdata/logs/mixed_context/match_logs_then_grpc_request/config.yaml delete mode 100644 connector/routingconnector/testdata/logs/mixed_context/match_logs_then_grpc_request/request.yaml delete mode 100644 connector/routingconnector/testdata/logs/mixed_context/match_logs_then_grpc_request/sink_0.yaml delete mode 100644 connector/routingconnector/testdata/logs/mixed_context/match_logs_then_grpc_request/sink_1.yaml delete mode 100644 connector/routingconnector/testdata/logs/mixed_context/match_logs_then_http_request/config.yaml delete mode 100644 connector/routingconnector/testdata/logs/mixed_context/match_logs_then_http_request/request.yaml delete mode 100644 connector/routingconnector/testdata/logs/mixed_context/match_logs_then_http_request/sink_0.yaml delete mode 100644 connector/routingconnector/testdata/logs/mixed_context/match_logs_then_http_request/sink_1.yaml delete mode 100644 connector/routingconnector/testdata/logs/mixed_context/match_logs_then_resource/config.yaml delete mode 100644 connector/routingconnector/testdata/logs/mixed_context/match_logs_then_resource/sink_0.yaml delete mode 100644 connector/routingconnector/testdata/logs/mixed_context/match_logs_then_resource/sink_1.yaml delete mode 100644 connector/routingconnector/testdata/logs/mixed_context/match_logs_then_resource/sink_default.yaml delete mode 100644 connector/routingconnector/testdata/logs/mixed_context/match_resource_then_grpc_request/config.yaml delete mode 100644 connector/routingconnector/testdata/logs/mixed_context/match_resource_then_grpc_request/request.yaml delete mode 100644 connector/routingconnector/testdata/logs/mixed_context/match_resource_then_grpc_request/sink_0.yaml delete mode 100644 connector/routingconnector/testdata/logs/mixed_context/match_resource_then_grpc_request/sink_1.yaml delete mode 100644 connector/routingconnector/testdata/logs/mixed_context/match_resource_then_http_request/config.yaml delete mode 100644 connector/routingconnector/testdata/logs/mixed_context/match_resource_then_http_request/request.yaml delete mode 100644 connector/routingconnector/testdata/logs/mixed_context/match_resource_then_http_request/sink_0.yaml delete mode 100644 connector/routingconnector/testdata/logs/mixed_context/match_resource_then_http_request/sink_1.yaml delete mode 100644 connector/routingconnector/testdata/logs/mixed_context/match_resource_then_logs/config.yaml delete mode 100644 connector/routingconnector/testdata/logs/mixed_context/match_resource_then_logs/sink_0.yaml delete mode 100644 connector/routingconnector/testdata/logs/mixed_context/match_resource_then_logs/sink_1.yaml delete mode 100644 connector/routingconnector/testdata/logs/mixed_context/match_resource_then_logs/sink_default.yaml delete mode 100644 connector/routingconnector/testdata/logs/request_context/match_any_value/config.yaml delete mode 100644 connector/routingconnector/testdata/logs/request_context/match_any_value/request.yaml delete mode 100644 connector/routingconnector/testdata/logs/request_context/match_any_value/sink_0.yaml delete mode 100644 connector/routingconnector/testdata/logs/request_context/match_grpc_value/config.yaml delete mode 100644 connector/routingconnector/testdata/logs/request_context/match_grpc_value/request.yaml delete mode 100644 connector/routingconnector/testdata/logs/request_context/match_grpc_value/sink_0.yaml delete mode 100644 connector/routingconnector/testdata/logs/request_context/match_http_value/config.yaml delete mode 100644 connector/routingconnector/testdata/logs/request_context/match_http_value/request.yaml delete mode 100644 connector/routingconnector/testdata/logs/request_context/match_http_value/sink_0.yaml delete mode 100644 connector/routingconnector/testdata/logs/request_context/match_http_value2/config.yaml delete mode 100644 connector/routingconnector/testdata/logs/request_context/match_http_value2/request.yaml delete mode 100644 connector/routingconnector/testdata/logs/request_context/match_http_value2/sink_0.yaml delete mode 100644 connector/routingconnector/testdata/logs/request_context/match_no_grpc_value/config.yaml delete mode 100644 connector/routingconnector/testdata/logs/request_context/match_no_grpc_value/request.yaml delete mode 100644 connector/routingconnector/testdata/logs/request_context/match_no_grpc_value/sink_default.yaml delete mode 100644 connector/routingconnector/testdata/logs/request_context/match_no_http_value/config.yaml delete mode 100644 connector/routingconnector/testdata/logs/request_context/match_no_http_value/request.yaml delete mode 100644 connector/routingconnector/testdata/logs/request_context/match_no_http_value/sink_default.yaml delete mode 100644 connector/routingconnector/testdata/logs/request_context/no_request_values/config.yaml delete mode 100644 connector/routingconnector/testdata/logs/request_context/no_request_values/sink_default.yaml delete mode 100644 connector/routingconnector/testdata/logs/resource_context/all_match_first_only/config.yaml delete mode 100644 connector/routingconnector/testdata/logs/resource_context/all_match_first_only/sink_0.yaml delete mode 100644 connector/routingconnector/testdata/logs/resource_context/all_match_last_only/config.yaml delete mode 100644 connector/routingconnector/testdata/logs/resource_context/all_match_last_only/sink_1.yaml delete mode 100644 connector/routingconnector/testdata/logs/resource_context/all_match_once/config.yaml delete mode 100644 connector/routingconnector/testdata/logs/resource_context/all_match_once/sink_0.yaml delete mode 100644 connector/routingconnector/testdata/logs/resource_context/each_matches_one/config.yaml delete mode 100644 connector/routingconnector/testdata/logs/resource_context/each_matches_one/sink_0.yaml delete mode 100644 connector/routingconnector/testdata/logs/resource_context/each_matches_one/sink_1.yaml delete mode 100644 connector/routingconnector/testdata/logs/resource_context/match_none_with_default/config.yaml delete mode 100644 connector/routingconnector/testdata/logs/resource_context/match_none_with_default/sink_default.yaml delete mode 100644 connector/routingconnector/testdata/logs/resource_context/match_none_without_default/config.yaml diff --git a/connector/routingconnector/config_test.go b/connector/routingconnector/config_test.go index a9a1e3e92391..0cd0456ec8af 100644 --- a/connector/routingconnector/config_test.go +++ b/connector/routingconnector/config_test.go @@ -276,3 +276,31 @@ func TestValidateConfig(t *testing.T) { }) } } + +type testConfigOption func(*Config) + +func withRoute(context, condition string, pipelines ...pipeline.ID) testConfigOption { + return func(cfg *Config) { + cfg.Table = append(cfg.Table, + RoutingTableItem{ + Context: context, + Condition: condition, + Pipelines: pipelines, + }) + } +} + +func withDefault(pipelines ...pipeline.ID) testConfigOption { + return func(cfg *Config) { + cfg.DefaultPipelines = pipelines + } +} + +func testConfig(opts ...testConfigOption) *Config { + cfg := createDefaultConfig().(*Config) + cfg.MatchOnce = true + for _, opt := range opts { + opt(cfg) + } + return cfg +} diff --git a/connector/routingconnector/go.mod b/connector/routingconnector/go.mod index 27e54160a93e..9edafd5f58aa 100644 --- a/connector/routingconnector/go.mod +++ b/connector/routingconnector/go.mod @@ -19,7 +19,6 @@ require ( go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 google.golang.org/grpc v1.67.1 - gopkg.in/yaml.v3 v3.0.1 ) require ( @@ -73,6 +72,7 @@ require ( google.golang.org/genproto/googleapis/rpc v0.0.0-20240822170219-fc7c04adadcd // indirect google.golang.org/protobuf v1.35.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect ) replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl => ../../pkg/ottl diff --git a/connector/routingconnector/logs_test.go b/connector/routingconnector/logs_test.go index 6afe61733005..cc558b51865e 100644 --- a/connector/routingconnector/logs_test.go +++ b/connector/routingconnector/logs_test.go @@ -5,15 +5,11 @@ package routingconnector // import "github.com/open-telemetry/opentelemetry-coll import ( "context" - "os" - "path/filepath" "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/confmap/confmaptest" "go.opentelemetry.io/collector/connector" "go.opentelemetry.io/collector/connector/connectortest" "go.opentelemetry.io/collector/consumer" @@ -21,7 +17,7 @@ import ( "go.opentelemetry.io/collector/pdata/plog" "go.opentelemetry.io/collector/pipeline" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden" + "github.com/open-telemetry/opentelemetry-collector-contrib/connector/routingconnector/internal/plogutiltest" ) func TestLogsRegisterConsumersForValidRoute(t *testing.T) { @@ -472,91 +468,469 @@ func TestLogsConnectorCapabilities(t *testing.T) { assert.False(t, conn.Capabilities().MutatesData) } -func TestLogsConnectorDetailed(t *testing.T) { - testCases := []string{ - filepath.Join("testdata", "logs", "request_context", "match_any_value"), - filepath.Join("testdata", "logs", "request_context", "match_grpc_value"), - filepath.Join("testdata", "logs", "request_context", "match_http_value"), - filepath.Join("testdata", "logs", "request_context", "match_http_value2"), - filepath.Join("testdata", "logs", "request_context", "match_no_grpc_value"), - filepath.Join("testdata", "logs", "request_context", "match_no_http_value"), - filepath.Join("testdata", "logs", "request_context", "no_request_values"), - filepath.Join("testdata", "logs", "resource_context", "all_match_first_only"), - filepath.Join("testdata", "logs", "resource_context", "all_match_last_only"), - filepath.Join("testdata", "logs", "resource_context", "all_match_once"), - filepath.Join("testdata", "logs", "resource_context", "each_matches_one"), - filepath.Join("testdata", "logs", "resource_context", "match_none_with_default"), - filepath.Join("testdata", "logs", "resource_context", "match_none_without_default"), - filepath.Join("testdata", "logs", "log_context", "all_match_first_only"), - filepath.Join("testdata", "logs", "log_context", "all_match_last_only"), - filepath.Join("testdata", "logs", "log_context", "match_none_with_default"), - filepath.Join("testdata", "logs", "log_context", "match_none_without_default"), - filepath.Join("testdata", "logs", "log_context", "some_match_each_route"), - filepath.Join("testdata", "logs", "log_context", "with_resource_condition"), - filepath.Join("testdata", "logs", "log_context", "with_scope_condition"), - filepath.Join("testdata", "logs", "log_context", "with_resource_and_scope_conditions"), - filepath.Join("testdata", "logs", "mixed_context", "match_logs_then_grpc_request"), - filepath.Join("testdata", "logs", "mixed_context", "match_logs_then_http_request"), - filepath.Join("testdata", "logs", "mixed_context", "match_logs_then_resource"), - filepath.Join("testdata", "logs", "mixed_context", "match_resource_then_grpc_request"), - filepath.Join("testdata", "logs", "mixed_context", "match_resource_then_http_request"), - filepath.Join("testdata", "logs", "mixed_context", "match_resource_then_logs"), +func TestLogsConnectorDetailedConcise(t *testing.T) { + idSink0 := pipeline.NewIDWithName(pipeline.SignalLogs, "0") + idSink1 := pipeline.NewIDWithName(pipeline.SignalLogs, "1") + idSinkD := pipeline.NewIDWithName(pipeline.SignalLogs, "default") + + isAcme := `request["X-Tenant"] == "acme"` + + isAnyResource := `attributes["resourceName"] != nil` + isResourceA := `attributes["resourceName"] == "resourceA"` + isResourceB := `attributes["resourceName"] == "resourceB"` + isResourceX := `attributes["resourceName"] == "resourceX"` + isResourceY := `attributes["resourceName"] == "resourceY"` + + isScopeC := `instrumentation_scope.name == "scopeC"` + isScopeD := `instrumentation_scope.name == "scopeD"` + + isAnyLog := `body != nil` + isLogE := `body == "logE"` + isLogF := `body == "logF"` + isLogX := `body == "logX"` + isLogY := `body == "logY"` + + and, or := " and ", " or " + + testCases := []struct { + name string + cfg *Config + ctx context.Context + input plog.Logs + expectSink0 plog.Logs + expectSink1 plog.Logs + expectSinkD plog.Logs + }{ + { + name: "request/no_request_values", + cfg: testConfig( + withRoute("request", isAcme, idSink0), + withDefault(idSinkD), + ), + ctx: context.Background(), + input: plogutiltest.NewLogs("AB", "CD", "EF"), + expectSink0: plog.Logs{}, + expectSink1: plog.Logs{}, + expectSinkD: plogutiltest.NewLogs("AB", "CD", "EF"), + }, + { + name: "request/match_any_value", + cfg: testConfig( + withRoute("request", isAcme, idSink0), + withDefault(idSinkD), + ), + ctx: withGRPCMetadata( + withHTTPMetadata( + context.Background(), + map[string][]string{"X-Tenant": {"acme"}}, + ), + map[string]string{"X-Tenant": "notacme"}, + ), + input: plogutiltest.NewLogs("AB", "CD", "EF"), + expectSink0: plogutiltest.NewLogs("AB", "CD", "EF"), + expectSink1: plog.Logs{}, + expectSinkD: plog.Logs{}, + }, + { + name: "request/match_grpc_value", + cfg: testConfig( + withRoute("request", isAcme, idSink0), + withDefault(idSinkD), + ), + ctx: withGRPCMetadata(context.Background(), map[string]string{"X-Tenant": "acme"}), + input: plogutiltest.NewLogs("AB", "CD", "EF"), + expectSink0: plogutiltest.NewLogs("AB", "CD", "EF"), + expectSink1: plog.Logs{}, + expectSinkD: plog.Logs{}, + }, + { + name: "request/match_no_grpc_value", + cfg: testConfig( + withRoute("request", isAcme, idSink0), + withDefault(idSinkD), + ), + ctx: withGRPCMetadata(context.Background(), map[string]string{"X-Tenant": "notacme"}), + input: plogutiltest.NewLogs("AB", "CD", "EF"), + expectSink0: plog.Logs{}, + expectSink1: plog.Logs{}, + expectSinkD: plogutiltest.NewLogs("AB", "CD", "EF"), + }, + { + name: "request/match_http_value", + cfg: testConfig( + withRoute("request", isAcme, idSink0), + withDefault(idSinkD), + ), + ctx: withHTTPMetadata(context.Background(), map[string][]string{"X-Tenant": {"acme"}}), + input: plogutiltest.NewLogs("AB", "CD", "EF"), + expectSink0: plogutiltest.NewLogs("AB", "CD", "EF"), + expectSink1: plog.Logs{}, + expectSinkD: plog.Logs{}, + }, + { + name: "request/match_http_value2", + cfg: testConfig( + withRoute("request", isAcme, idSink0), + withDefault(idSinkD), + ), + ctx: withHTTPMetadata(context.Background(), map[string][]string{"X-Tenant": {"notacme", "acme"}}), + input: plogutiltest.NewLogs("AB", "CD", "EF"), + expectSink0: plogutiltest.NewLogs("AB", "CD", "EF"), + expectSink1: plog.Logs{}, + expectSinkD: plog.Logs{}, + }, + { + name: "request/match_no_http_value", + cfg: testConfig( + withRoute("request", isAcme, idSink0), + withDefault(idSinkD), + ), + ctx: withHTTPMetadata(context.Background(), map[string][]string{"X-Tenant": {"notacme"}}), + input: plogutiltest.NewLogs("AB", "CD", "EF"), + expectSink0: plog.Logs{}, + expectSink1: plog.Logs{}, + expectSinkD: plogutiltest.NewLogs("AB", "CD", "EF"), + }, + { + name: "resource/all_match_first_only", + cfg: testConfig( + withRoute("resource", isAnyResource, idSink0), + withRoute("resource", isResourceY, idSink1), + withDefault(idSinkD), + ), + input: plogutiltest.NewLogs("AB", "CD", "EF"), + expectSink0: plogutiltest.NewLogs("AB", "CD", "EF"), + expectSink1: plog.Logs{}, + expectSinkD: plog.Logs{}, + }, + { + name: "resource/all_match_last_only", + cfg: testConfig( + withRoute("resource", isResourceX, idSink0), + withRoute("resource", isAnyResource, idSink1), + withDefault(idSinkD), + ), + input: plogutiltest.NewLogs("AB", "CD", "EF"), + expectSink0: plog.Logs{}, + expectSink1: plogutiltest.NewLogs("AB", "CD", "EF"), + expectSinkD: plog.Logs{}, + }, + { + name: "resource/all_match_only_once", + cfg: testConfig( + withRoute("resource", isAnyResource, idSink0), + withRoute("resource", isResourceA+or+isResourceB, idSink1), + withDefault(idSinkD), + ), + input: plogutiltest.NewLogs("AB", "CD", "EF"), + expectSink0: plogutiltest.NewLogs("AB", "CD", "EF"), + expectSink1: plog.Logs{}, + expectSinkD: plog.Logs{}, + }, + { + name: "resource/each_matches_one", + cfg: testConfig( + withRoute("resource", isResourceA, idSink0), + withRoute("resource", isResourceB, idSink1), + withDefault(idSinkD), + ), + input: plogutiltest.NewLogs("AB", "CD", "EF"), + expectSink0: plogutiltest.NewLogs("A", "CD", "EF"), + expectSink1: plogutiltest.NewLogs("B", "CD", "EF"), + expectSinkD: plog.Logs{}, + }, + { + name: "resource/some_match_with_default", + cfg: testConfig( + withRoute("resource", isResourceX, idSink0), + withRoute("resource", isResourceB, idSink1), + withDefault(idSinkD), + ), + input: plogutiltest.NewLogs("AB", "CD", "EF"), + expectSink0: plog.Logs{}, + expectSink1: plogutiltest.NewLogs("B", "CD", "EF"), + expectSinkD: plogutiltest.NewLogs("A", "CD", "EF"), + }, + { + name: "resource/some_match_without_default", + cfg: testConfig( + withRoute("resource", isResourceX, idSink0), + withRoute("resource", isResourceB, idSink1), + ), + input: plogutiltest.NewLogs("AB", "CD", "EF"), + expectSink0: plog.Logs{}, + expectSink1: plogutiltest.NewLogs("B", "CD", "EF"), + expectSinkD: plog.Logs{}, + }, + { + name: "resource/match_none_with_default", + cfg: testConfig( + withRoute("resource", isResourceX, idSink0), + withRoute("resource", isResourceY, idSink1), + withDefault(idSinkD), + ), + input: plogutiltest.NewLogs("AB", "CD", "EF"), + expectSink0: plog.Logs{}, + expectSink1: plog.Logs{}, + expectSinkD: plogutiltest.NewLogs("AB", "CD", "EF"), + }, + { + name: "resource/match_none_without_default", + cfg: testConfig( + withRoute("resource", isResourceX, idSink0), + withRoute("resource", isResourceY, idSink1), + ), + input: plogutiltest.NewLogs("AB", "CD", "EF"), + expectSink0: plog.Logs{}, + expectSink1: plog.Logs{}, + expectSinkD: plog.Logs{}, + }, + { + name: "log/all_match_first_only", + cfg: testConfig( + withRoute("log", isAnyLog, idSink0), + withRoute("log", isLogY, idSink1), + withDefault(idSinkD), + ), + input: plogutiltest.NewLogs("AB", "CD", "EF"), + expectSink0: plogutiltest.NewLogs("AB", "CD", "EF"), + expectSink1: plog.Logs{}, + expectSinkD: plog.Logs{}, + }, + { + name: "log/all_match_last_only", + cfg: testConfig( + withRoute("log", isLogX, idSink0), + withRoute("log", isAnyLog, idSink1), + withDefault(idSinkD), + ), + input: plogutiltest.NewLogs("AB", "CD", "EF"), + expectSink0: plog.Logs{}, + expectSink1: plogutiltest.NewLogs("AB", "CD", "EF"), + expectSinkD: plog.Logs{}, + }, + { + name: "log/all_match_only_once", + cfg: testConfig( + withRoute("log", isAnyLog, idSink0), + withRoute("log", isLogE+or+isLogF, idSink1), + withDefault(idSinkD), + ), + input: plogutiltest.NewLogs("AB", "CD", "EF"), + expectSink0: plogutiltest.NewLogs("AB", "CD", "EF"), + expectSink1: plog.Logs{}, + expectSinkD: plog.Logs{}, + }, + { + name: "log/each_matches_one", + cfg: testConfig( + withRoute("log", isLogE, idSink0), + withRoute("log", isLogF, idSink1), + withDefault(idSinkD), + ), + input: plogutiltest.NewLogs("AB", "CD", "EF"), + expectSink0: plogutiltest.NewLogs("AB", "CD", "E"), + expectSink1: plogutiltest.NewLogs("AB", "CD", "F"), + expectSinkD: plog.Logs{}, + }, + { + name: "log/some_match_with_default", + cfg: testConfig( + withRoute("log", isLogX, idSink0), + withRoute("log", isLogF, idSink1), + withDefault(idSinkD), + ), + input: plogutiltest.NewLogs("AB", "CD", "EF"), + expectSink0: plog.Logs{}, + expectSink1: plogutiltest.NewLogs("AB", "CD", "F"), + expectSinkD: plogutiltest.NewLogs("AB", "CD", "E"), + }, + { + name: "log/some_match_without_default", + cfg: testConfig( + withRoute("log", isLogX, idSink0), + withRoute("log", isLogF, idSink1), + ), + input: plogutiltest.NewLogs("AB", "CD", "EF"), + expectSink0: plog.Logs{}, + expectSink1: plogutiltest.NewLogs("AB", "CD", "F"), + expectSinkD: plog.Logs{}, + }, + { + name: "log/match_none_with_default", + cfg: testConfig( + withRoute("log", isLogX, idSink0), + withRoute("log", isLogY, idSink1), + withDefault(idSinkD), + ), + input: plogutiltest.NewLogs("AB", "CD", "EF"), + expectSink0: plog.Logs{}, + expectSink1: plog.Logs{}, + expectSinkD: plogutiltest.NewLogs("AB", "CD", "EF"), + }, + { + name: "log/match_none_without_default", + cfg: testConfig( + withRoute("log", isLogX, idSink0), + withRoute("log", isLogY, idSink1), + ), + input: plogutiltest.NewLogs("AB", "CD", "EF"), + expectSink0: plog.Logs{}, + expectSink1: plog.Logs{}, + expectSinkD: plog.Logs{}, + }, + { + name: "log/with_resource_condition", + cfg: testConfig( + withRoute("log", "resource."+isResourceB+and+isAnyLog, idSink0), + withRoute("log", isLogY, idSink1), + withDefault(idSinkD), + ), + input: plogutiltest.NewLogs("AB", "CD", "EF"), + expectSink0: plogutiltest.NewLogs("B", "CD", "EF"), + expectSink1: plog.Logs{}, + expectSinkD: plogutiltest.NewLogs("A", "CD", "EF"), + }, + { + name: "log/with_scope_condition", + cfg: testConfig( + withRoute("log", isScopeC+and+isAnyLog, idSink0), + withRoute("log", isLogY, idSink1), + withDefault(idSinkD), + ), + input: plogutiltest.NewLogs("AB", "CD", "EF"), + expectSink0: plogutiltest.NewLogs("AB", "C", "EF"), + expectSink1: plog.Logs{}, + expectSinkD: plogutiltest.NewLogs("AB", "D", "EF"), + }, + { + name: "log/with_resource_and_scope_conditions", + cfg: testConfig( + withRoute("log", "resource."+isResourceB+and+isScopeD+and+isAnyLog, idSink0), + withRoute("log", isLogY, idSink1), + withDefault(idSinkD), + ), + input: plogutiltest.NewLogs("AB", "CD", "EF"), + expectSink0: plogutiltest.NewLogs("B", "D", "EF"), + expectSink1: plog.Logs{}, + expectSinkD: plogutiltest.NewLogsFromOpts( + plogutiltest.WithResource('A', plogutiltest.WithScope('C', "EF"), plogutiltest.WithScope('D', "EF")), + plogutiltest.WithResource('B', plogutiltest.WithScope('C', "EF")), + ), + }, + { + name: "match_resource_then_logs", + cfg: testConfig( + withRoute("resource", isResourceA, idSink0), + withRoute("log", isLogE, idSink1), + withDefault(idSinkD), + ), + input: plogutiltest.NewLogs("AB", "CD", "EF"), + expectSink0: plogutiltest.NewLogs("A", "CD", "EF"), + expectSink1: plogutiltest.NewLogs("B", "CD", "E"), + expectSinkD: plogutiltest.NewLogs("B", "CD", "F"), + }, + { + name: "match_logs_then_resource", + cfg: testConfig( + withRoute("log", isLogE, idSink0), + withRoute("resource", isResourceB, idSink1), + withDefault(idSinkD), + ), + input: plogutiltest.NewLogs("AB", "CD", "EF"), + expectSink0: plogutiltest.NewLogs("AB", "CD", "E"), + expectSink1: plogutiltest.NewLogs("B", "CD", "F"), + expectSinkD: plogutiltest.NewLogs("A", "CD", "F"), + }, + { + name: "match_resource_then_grpc_request", + cfg: testConfig( + withRoute("resource", isResourceA, idSink0), + withRoute("request", isAcme, idSink1), + withDefault(idSinkD), + ), + ctx: withGRPCMetadata(context.Background(), map[string]string{"X-Tenant": "acme"}), + input: plogutiltest.NewLogs("AB", "CD", "EF"), + expectSink0: plogutiltest.NewLogs("A", "CD", "EF"), + expectSink1: plogutiltest.NewLogs("B", "CD", "EF"), + expectSinkD: plog.Logs{}, + }, + { + name: "match_logs_then_grpc_request", + cfg: testConfig( + withRoute("log", isLogF, idSink0), + withRoute("request", isAcme, idSink1), + withDefault(idSinkD), + ), + ctx: withGRPCMetadata(context.Background(), map[string]string{"X-Tenant": "acme"}), + input: plogutiltest.NewLogs("AB", "CD", "EF"), + expectSink0: plogutiltest.NewLogs("AB", "CD", "F"), + expectSink1: plogutiltest.NewLogs("AB", "CD", "E"), + expectSinkD: plog.Logs{}, + }, + { + name: "match_resource_then_http_request", + cfg: testConfig( + withRoute("resource", isResourceA, idSink0), + withRoute("request", isAcme, idSink1), + withDefault(idSinkD), + ), + ctx: withHTTPMetadata(context.Background(), map[string][]string{"X-Tenant": {"acme"}}), + input: plogutiltest.NewLogs("AB", "CD", "EF"), + expectSink0: plogutiltest.NewLogs("A", "CD", "EF"), + expectSink1: plogutiltest.NewLogs("B", "CD", "EF"), + expectSinkD: plog.Logs{}, + }, + { + name: "match_logs_then_http_request", + cfg: testConfig( + withRoute("log", isLogF, idSink0), + withRoute("request", isAcme, idSink1), + withDefault(idSinkD), + ), + ctx: withHTTPMetadata(context.Background(), map[string][]string{"X-Tenant": {"acme"}}), + input: plogutiltest.NewLogs("AB", "CD", "EF"), + expectSink0: plogutiltest.NewLogs("AB", "CD", "F"), + expectSink1: plogutiltest.NewLogs("AB", "CD", "E"), + expectSinkD: plog.Logs{}, + }, } for _, tt := range testCases { - t.Run(tt, func(t *testing.T) { - - cm, err := confmaptest.LoadConf(filepath.Join(tt, "config.yaml")) - require.NoError(t, err) - factory := NewFactory() - cfg := factory.CreateDefaultConfig() - sub, err := cm.Sub("routing") - require.NoError(t, err) - require.NoError(t, sub.Unmarshal(cfg)) - require.NoError(t, component.ValidateConfig(cfg)) - - var sinkDefault, sink0, sink1 consumertest.LogsSink + t.Run(tt.name, func(t *testing.T) { + var sinkD, sink0, sink1 consumertest.LogsSink router := connector.NewLogsRouter(map[pipeline.ID]consumer.Logs{ - pipeline.NewIDWithName(pipeline.SignalLogs, "default"): &sinkDefault, pipeline.NewIDWithName(pipeline.SignalLogs, "0"): &sink0, pipeline.NewIDWithName(pipeline.SignalLogs, "1"): &sink1, + pipeline.NewIDWithName(pipeline.SignalLogs, "default"): &sinkD, }) - conn, err := factory.CreateLogsToLogs( + conn, err := NewFactory().CreateLogsToLogs( context.Background(), connectortest.NewNopSettings(), - cfg, + tt.cfg, router.(consumer.Logs), ) require.NoError(t, err) ctx := context.Background() - if ctxFromFile, readErr := createContextFromFile(t, filepath.Join(tt, "request.yaml")); readErr == nil { - ctx = ctxFromFile - } else if !os.IsNotExist(readErr) { - t.Fatalf("Error reading request.yaml: %v", readErr) + if tt.ctx != nil { + ctx = tt.ctx } - input, readErr := golden.ReadLogs(filepath.Join("testdata", "logs", "input.yaml")) - require.NoError(t, readErr) - - require.NoError(t, conn.ConsumeLogs(ctx, input)) - - assertExpected := func(actual []plog.Logs, filePath string) { - expected, err := golden.ReadLogs(filePath) - switch { - case err == nil: - require.Len(t, actual, 1) - assert.Equal(t, expected, actual[0]) - case os.IsNotExist(err): - assert.Empty(t, actual) - default: - t.Fatalf("Error reading %s: %v", filePath, err) + require.NoError(t, conn.ConsumeLogs(ctx, tt.input)) + + assertExpected := func(sink *consumertest.LogsSink, expected plog.Logs, name string) { + if expected == (plog.Logs{}) { + assert.Empty(t, sink.AllLogs(), name) + } else { + require.Len(t, sink.AllLogs(), 1, name) + assert.Equal(t, expected, sink.AllLogs()[0], name) } } - assertExpected(sink0.AllLogs(), filepath.Join(tt, "sink_0.yaml")) - assertExpected(sink1.AllLogs(), filepath.Join(tt, "sink_1.yaml")) - assertExpected(sinkDefault.AllLogs(), filepath.Join(tt, "sink_default.yaml")) + assertExpected(&sink0, tt.expectSink0, "sink0") + assertExpected(&sink1, tt.expectSink1, "sink1") + assertExpected(&sinkD, tt.expectSinkD, "sinkD") }) } } diff --git a/connector/routingconnector/metrics_test.go b/connector/routingconnector/metrics_test.go index f1eb9bd295a9..44ace2f466e7 100644 --- a/connector/routingconnector/metrics_test.go +++ b/connector/routingconnector/metrics_test.go @@ -509,25 +509,6 @@ func TestMetricsConnectorDetailedConcise(t *testing.T) { isX := `attributes["resourceName"] == "resourceX"` isY := `attributes["resourceName"] == "resourceY"` - testCfg := func(conditionZero, conditionOne string, withDefault bool) *Config { - cfg := createDefaultConfig().(*Config) - cfg.MatchOnce = true - cfg.Table = []RoutingTableItem{ - { - Condition: conditionZero, - Pipelines: []pipeline.ID{idSink0}, - }, - { - Condition: conditionOne, - Pipelines: []pipeline.ID{idSink1}, - }, - } - if withDefault { - cfg.DefaultPipelines = []pipeline.ID{idSinkD} - } - return cfg - } - testCases := []struct { name string cfg *Config @@ -537,64 +518,94 @@ func TestMetricsConnectorDetailedConcise(t *testing.T) { expectSinkD pmetric.Metrics }{ { - name: "all_match_first_only", - cfg: testCfg(isNotNil, isY, true), + name: "all_match_first_only", + cfg: testConfig( + withRoute("resource", isNotNil, idSink0), + withRoute("resource", isY, idSink1), + withDefault(idSinkD), + ), input: pmetricutiltest.NewMetrics("AB", "CD", "EF", "FG"), expectSink0: pmetricutiltest.NewMetrics("AB", "CD", "EF", "FG"), expectSink1: pmetric.Metrics{}, expectSinkD: pmetric.Metrics{}, }, { - name: "all_match_last_only", - cfg: testCfg(isX, isNotNil, true), + name: "all_match_last_only", + cfg: testConfig( + withRoute("resource", isX, idSink0), + withRoute("resource", isNotNil, idSink1), + withDefault(idSinkD), + ), input: pmetricutiltest.NewMetrics("AB", "CD", "EF", "FG"), expectSink0: pmetric.Metrics{}, expectSink1: pmetricutiltest.NewMetrics("AB", "CD", "EF", "FG"), expectSinkD: pmetric.Metrics{}, }, { - name: "all_match_only_once", - cfg: testCfg(isNotNil, isB, true), + name: "all_match_only_once", + cfg: testConfig( + withRoute("resource", isNotNil, idSink0), + withRoute("resource", isA+" or "+isB, idSink1), + withDefault(idSinkD), + ), input: pmetricutiltest.NewMetrics("AB", "CD", "EF", "FG"), expectSink0: pmetricutiltest.NewMetrics("AB", "CD", "EF", "FG"), expectSink1: pmetric.Metrics{}, expectSinkD: pmetric.Metrics{}, }, { - name: "each_matches_one", - cfg: testCfg(isA, isB, true), + name: "each_matches_one", + cfg: testConfig( + withRoute("resource", isA, idSink0), + withRoute("resource", isB, idSink1), + withDefault(idSinkD), + ), input: pmetricutiltest.NewMetrics("AB", "CD", "EF", "FG"), expectSink0: pmetricutiltest.NewMetrics("A", "CD", "EF", "FG"), expectSink1: pmetricutiltest.NewMetrics("B", "CD", "EF", "FG"), expectSinkD: pmetric.Metrics{}, }, { - name: "some_match_with_default", - cfg: testCfg(isX, isB, true), + name: "some_match_with_default", + cfg: testConfig( + withRoute("resource", isX, idSink0), + withRoute("resource", isB, idSink1), + withDefault(idSinkD), + ), input: pmetricutiltest.NewMetrics("AB", "CD", "EF", "FG"), expectSink0: pmetric.Metrics{}, expectSink1: pmetricutiltest.NewMetrics("B", "CD", "EF", "FG"), expectSinkD: pmetricutiltest.NewMetrics("A", "CD", "EF", "FG"), }, { - name: "some_match_without_default", - cfg: testCfg(isX, isB, false), + name: "some_match_without_default", + cfg: testConfig( + withRoute("resource", isX, idSink0), + withRoute("resource", isB, idSink1), + ), input: pmetricutiltest.NewMetrics("AB", "CD", "EF", "FG"), expectSink0: pmetric.Metrics{}, expectSink1: pmetricutiltest.NewMetrics("B", "CD", "EF", "FG"), expectSinkD: pmetric.Metrics{}, }, { - name: "match_none_with_default", - cfg: testCfg(isX, isY, true), + name: "match_none_with_default", + cfg: testConfig( + withRoute("resource", isX, idSink0), + withRoute("resource", isY, idSink1), + withDefault(idSinkD), + ), input: pmetricutiltest.NewMetrics("AB", "CD", "EF", "FG"), expectSink0: pmetric.Metrics{}, expectSink1: pmetric.Metrics{}, expectSinkD: pmetricutiltest.NewMetrics("AB", "CD", "EF", "FG"), }, { - name: "match_none_without_default", - cfg: testCfg(isX, isY, false), + name: "match_none_without_default", + cfg: testConfig( + withRoute("resource", isX, idSink0), + withRoute("resource", isY, idSink1), + ), input: pmetricutiltest.NewMetrics("AB", "CD", "EF", "FG"), expectSink0: pmetric.Metrics{}, expectSink1: pmetric.Metrics{}, diff --git a/connector/routingconnector/request_test.go b/connector/routingconnector/request_test.go index 0a6baaf96633..5e432c98f07c 100644 --- a/connector/routingconnector/request_test.go +++ b/connector/routingconnector/request_test.go @@ -5,38 +5,15 @@ package routingconnector // import "github.com/open-telemetry/opentelemetry-coll import ( "context" - "os" - "testing" "go.opentelemetry.io/collector/client" "google.golang.org/grpc/metadata" - "gopkg.in/yaml.v3" ) -type ctxConfig struct { - GRPC map[string]string `mapstructure:"grpc"` - HTTP map[string][]string `mapstructure:"http"` +func withGRPCMetadata(ctx context.Context, md map[string]string) context.Context { + return metadata.NewIncomingContext(ctx, metadata.New(md)) } -func createContextFromFile(t *testing.T, filePath string) (context.Context, error) { - t.Helper() - - b, err := os.ReadFile(filePath) - if err != nil { - return nil, err - } - - var cfg ctxConfig - if err := yaml.Unmarshal(b, &cfg); err != nil { - return nil, err - } - - ctx := context.Background() - if len(cfg.GRPC) > 0 { - ctx = metadata.NewIncomingContext(ctx, metadata.New(cfg.GRPC)) - } - if len(cfg.HTTP) > 0 { - ctx = client.NewContext(ctx, client.Info{Metadata: client.NewMetadata(cfg.HTTP)}) - } - return ctx, nil +func withHTTPMetadata(ctx context.Context, md map[string][]string) context.Context { + return client.NewContext(ctx, client.Info{Metadata: client.NewMetadata(md)}) } diff --git a/connector/routingconnector/testdata/logs/input.yaml b/connector/routingconnector/testdata/logs/input.yaml deleted file mode 100644 index 63c6eada6cf9..000000000000 --- a/connector/routingconnector/testdata/logs/input.yaml +++ /dev/null @@ -1,141 +0,0 @@ -resourceLogs: - - resource: - attributes: - - key: resourceName - value: - stringValue: resourceA - - key: resourceNameAgain - value: - stringValue: resourceA - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scopeLogs: - - attributes: - - key: scopeName - value: - stringValue: scopeA - - key: scopeNameAgain - value: - stringValue: scopeA - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeA - version: v0.1.0 - - attributes: - - key: scopeName - value: - stringValue: scopeB - - key: scopeNameAgain - value: - stringValue: scopeB - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeB - version: v0.1.0 - - resource: - attributes: - - key: resourceName - value: - stringValue: resourceB - - key: resourceNameAgain - value: - stringValue: resourceB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scopeLogs: - - attributes: - - key: scopeName - value: - stringValue: scopeA - - key: scopeNameAgain - value: - stringValue: scopeA - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeA - version: v0.1.0 - - attributes: - - key: scopeName - value: - stringValue: scopeB - - key: scopeNameAgain - value: - stringValue: scopeB - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeB - version: v0.1.0 diff --git a/connector/routingconnector/testdata/logs/log_context/all_match_first_only/config.yaml b/connector/routingconnector/testdata/logs/log_context/all_match_first_only/config.yaml deleted file mode 100644 index e890865e53dc..000000000000 --- a/connector/routingconnector/testdata/logs/log_context/all_match_first_only/config.yaml +++ /dev/null @@ -1,13 +0,0 @@ -routing: - match_once: true - default_pipelines: - - logs/default - table: - - context: log - condition: attributes["logName"] != nil - pipelines: - - logs/0 - - context: log - condition: attributes["logName"] == "logY" - pipelines: - - logs/1 diff --git a/connector/routingconnector/testdata/logs/log_context/all_match_first_only/sink_0.yaml b/connector/routingconnector/testdata/logs/log_context/all_match_first_only/sink_0.yaml deleted file mode 100644 index 63c6eada6cf9..000000000000 --- a/connector/routingconnector/testdata/logs/log_context/all_match_first_only/sink_0.yaml +++ /dev/null @@ -1,141 +0,0 @@ -resourceLogs: - - resource: - attributes: - - key: resourceName - value: - stringValue: resourceA - - key: resourceNameAgain - value: - stringValue: resourceA - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scopeLogs: - - attributes: - - key: scopeName - value: - stringValue: scopeA - - key: scopeNameAgain - value: - stringValue: scopeA - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeA - version: v0.1.0 - - attributes: - - key: scopeName - value: - stringValue: scopeB - - key: scopeNameAgain - value: - stringValue: scopeB - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeB - version: v0.1.0 - - resource: - attributes: - - key: resourceName - value: - stringValue: resourceB - - key: resourceNameAgain - value: - stringValue: resourceB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scopeLogs: - - attributes: - - key: scopeName - value: - stringValue: scopeA - - key: scopeNameAgain - value: - stringValue: scopeA - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeA - version: v0.1.0 - - attributes: - - key: scopeName - value: - stringValue: scopeB - - key: scopeNameAgain - value: - stringValue: scopeB - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeB - version: v0.1.0 diff --git a/connector/routingconnector/testdata/logs/log_context/all_match_last_only/config.yaml b/connector/routingconnector/testdata/logs/log_context/all_match_last_only/config.yaml deleted file mode 100644 index 87873dd530db..000000000000 --- a/connector/routingconnector/testdata/logs/log_context/all_match_last_only/config.yaml +++ /dev/null @@ -1,13 +0,0 @@ -routing: - match_once: true - default_pipelines: - - logs/default - table: - - context: log - condition: attributes["logName"] == "logX" - pipelines: - - logs/0 - - context: log - condition: attributes["logName"] != nil - pipelines: - - logs/1 diff --git a/connector/routingconnector/testdata/logs/log_context/all_match_last_only/sink_1.yaml b/connector/routingconnector/testdata/logs/log_context/all_match_last_only/sink_1.yaml deleted file mode 100644 index 63c6eada6cf9..000000000000 --- a/connector/routingconnector/testdata/logs/log_context/all_match_last_only/sink_1.yaml +++ /dev/null @@ -1,141 +0,0 @@ -resourceLogs: - - resource: - attributes: - - key: resourceName - value: - stringValue: resourceA - - key: resourceNameAgain - value: - stringValue: resourceA - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scopeLogs: - - attributes: - - key: scopeName - value: - stringValue: scopeA - - key: scopeNameAgain - value: - stringValue: scopeA - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeA - version: v0.1.0 - - attributes: - - key: scopeName - value: - stringValue: scopeB - - key: scopeNameAgain - value: - stringValue: scopeB - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeB - version: v0.1.0 - - resource: - attributes: - - key: resourceName - value: - stringValue: resourceB - - key: resourceNameAgain - value: - stringValue: resourceB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scopeLogs: - - attributes: - - key: scopeName - value: - stringValue: scopeA - - key: scopeNameAgain - value: - stringValue: scopeA - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeA - version: v0.1.0 - - attributes: - - key: scopeName - value: - stringValue: scopeB - - key: scopeNameAgain - value: - stringValue: scopeB - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeB - version: v0.1.0 diff --git a/connector/routingconnector/testdata/logs/log_context/match_none_with_default/config.yaml b/connector/routingconnector/testdata/logs/log_context/match_none_with_default/config.yaml deleted file mode 100644 index dacb340e9937..000000000000 --- a/connector/routingconnector/testdata/logs/log_context/match_none_with_default/config.yaml +++ /dev/null @@ -1,13 +0,0 @@ -routing: - match_once: true - default_pipelines: - - logs/default - table: - - context: log - condition: attributes["logName"] == "logX" - pipelines: - - logs/0 - - context: log - condition: attributes["logName"] == "logY" - pipelines: - - logs/1 diff --git a/connector/routingconnector/testdata/logs/log_context/match_none_with_default/sink_default.yaml b/connector/routingconnector/testdata/logs/log_context/match_none_with_default/sink_default.yaml deleted file mode 100644 index 63c6eada6cf9..000000000000 --- a/connector/routingconnector/testdata/logs/log_context/match_none_with_default/sink_default.yaml +++ /dev/null @@ -1,141 +0,0 @@ -resourceLogs: - - resource: - attributes: - - key: resourceName - value: - stringValue: resourceA - - key: resourceNameAgain - value: - stringValue: resourceA - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scopeLogs: - - attributes: - - key: scopeName - value: - stringValue: scopeA - - key: scopeNameAgain - value: - stringValue: scopeA - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeA - version: v0.1.0 - - attributes: - - key: scopeName - value: - stringValue: scopeB - - key: scopeNameAgain - value: - stringValue: scopeB - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeB - version: v0.1.0 - - resource: - attributes: - - key: resourceName - value: - stringValue: resourceB - - key: resourceNameAgain - value: - stringValue: resourceB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scopeLogs: - - attributes: - - key: scopeName - value: - stringValue: scopeA - - key: scopeNameAgain - value: - stringValue: scopeA - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeA - version: v0.1.0 - - attributes: - - key: scopeName - value: - stringValue: scopeB - - key: scopeNameAgain - value: - stringValue: scopeB - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeB - version: v0.1.0 diff --git a/connector/routingconnector/testdata/logs/log_context/match_none_without_default/config.yaml b/connector/routingconnector/testdata/logs/log_context/match_none_without_default/config.yaml deleted file mode 100644 index 74264624fc67..000000000000 --- a/connector/routingconnector/testdata/logs/log_context/match_none_without_default/config.yaml +++ /dev/null @@ -1,12 +0,0 @@ -routing: - match_once: true - # no default pipelines - table: - - context: log - condition: attributes["logName"] == "logX" - pipelines: - - logs/0 - - context: log - condition: attributes["logName"] == "logY" - pipelines: - - logs/1 diff --git a/connector/routingconnector/testdata/logs/log_context/some_match_each_route/config.yaml b/connector/routingconnector/testdata/logs/log_context/some_match_each_route/config.yaml deleted file mode 100644 index b830ca7e9450..000000000000 --- a/connector/routingconnector/testdata/logs/log_context/some_match_each_route/config.yaml +++ /dev/null @@ -1,13 +0,0 @@ -routing: - match_once: true - default_pipelines: - - logs/default - table: - - context: log - condition: attributes["logName"] == "logA" and resource.attributes["resourceName"] == "resourceA" - pipelines: - - logs/0 - - context: log - condition: attributes["logName"] == "logB" and resource.attributes["resourceName"] == "resourceB" - pipelines: - - logs/1 diff --git a/connector/routingconnector/testdata/logs/log_context/some_match_each_route/sink_0.yaml b/connector/routingconnector/testdata/logs/log_context/some_match_each_route/sink_0.yaml deleted file mode 100644 index 539ec42b1322..000000000000 --- a/connector/routingconnector/testdata/logs/log_context/some_match_each_route/sink_0.yaml +++ /dev/null @@ -1,53 +0,0 @@ -resourceLogs: - - resource: - attributes: - - key: resourceName - value: - stringValue: resourceA - - key: resourceNameAgain - value: - stringValue: resourceA - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scopeLogs: - - attributes: - - key: scopeName - value: - stringValue: scopeA - - key: scopeNameAgain - value: - stringValue: scopeA - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeA - version: v0.1.0 - - attributes: - - key: scopeName - value: - stringValue: scopeB - - key: scopeNameAgain - value: - stringValue: scopeB - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeB - version: v0.1.0 diff --git a/connector/routingconnector/testdata/logs/log_context/some_match_each_route/sink_1.yaml b/connector/routingconnector/testdata/logs/log_context/some_match_each_route/sink_1.yaml deleted file mode 100644 index ba61f2992fbf..000000000000 --- a/connector/routingconnector/testdata/logs/log_context/some_match_each_route/sink_1.yaml +++ /dev/null @@ -1,53 +0,0 @@ -resourceLogs: - - resource: - attributes: - - key: resourceName - value: - stringValue: resourceB - - key: resourceNameAgain - value: - stringValue: resourceB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scopeLogs: - - attributes: - - key: scopeName - value: - stringValue: scopeA - - key: scopeNameAgain - value: - stringValue: scopeA - logRecords: - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeA - version: v0.1.0 - - attributes: - - key: scopeName - value: - stringValue: scopeB - - key: scopeNameAgain - value: - stringValue: scopeB - logRecords: - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeB - version: v0.1.0 diff --git a/connector/routingconnector/testdata/logs/log_context/some_match_each_route/sink_default.yaml b/connector/routingconnector/testdata/logs/log_context/some_match_each_route/sink_default.yaml deleted file mode 100644 index ee4340abb2cc..000000000000 --- a/connector/routingconnector/testdata/logs/log_context/some_match_each_route/sink_default.yaml +++ /dev/null @@ -1,105 +0,0 @@ -resourceLogs: - - resource: - attributes: - - key: resourceName - value: - stringValue: resourceA - - key: resourceNameAgain - value: - stringValue: resourceA - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scopeLogs: - - attributes: - - key: scopeName - value: - stringValue: scopeA - - key: scopeNameAgain - value: - stringValue: scopeA - logRecords: - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeA - version: v0.1.0 - - attributes: - - key: scopeName - value: - stringValue: scopeB - - key: scopeNameAgain - value: - stringValue: scopeB - logRecords: - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeB - version: v0.1.0 - - resource: - attributes: - - key: resourceName - value: - stringValue: resourceB - - key: resourceNameAgain - value: - stringValue: resourceB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scopeLogs: - - attributes: - - key: scopeName - value: - stringValue: scopeA - - key: scopeNameAgain - value: - stringValue: scopeA - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeA - version: v0.1.0 - - attributes: - - key: scopeName - value: - stringValue: scopeB - - key: scopeNameAgain - value: - stringValue: scopeB - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeB - version: v0.1.0 diff --git a/connector/routingconnector/testdata/logs/log_context/with_resource_and_scope_conditions/config.yaml b/connector/routingconnector/testdata/logs/log_context/with_resource_and_scope_conditions/config.yaml deleted file mode 100644 index 26855ab4322d..000000000000 --- a/connector/routingconnector/testdata/logs/log_context/with_resource_and_scope_conditions/config.yaml +++ /dev/null @@ -1,13 +0,0 @@ -routing: - match_once: true - default_pipelines: - - logs/default - table: - - context: log - condition: resource.attributes["resourceName"] == "resourceB" and instrumentation_scope.name == "scopeA" and attributes["logName"] != nil - pipelines: - - logs/0 - - context: log - condition: attributes["logName"] == "logY" - pipelines: - - logs/1 diff --git a/connector/routingconnector/testdata/logs/log_context/with_resource_and_scope_conditions/sink_0.yaml b/connector/routingconnector/testdata/logs/log_context/with_resource_and_scope_conditions/sink_0.yaml deleted file mode 100644 index d42bbbcd478c..000000000000 --- a/connector/routingconnector/testdata/logs/log_context/with_resource_and_scope_conditions/sink_0.yaml +++ /dev/null @@ -1,41 +0,0 @@ -resourceLogs: - - resource: - attributes: - - key: resourceName - value: - stringValue: resourceB - - key: resourceNameAgain - value: - stringValue: resourceB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scopeLogs: - - attributes: - - key: scopeName - value: - stringValue: scopeA - - key: scopeNameAgain - value: - stringValue: scopeA - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeA - version: v0.1.0 diff --git a/connector/routingconnector/testdata/logs/log_context/with_resource_and_scope_conditions/sink_default.yaml b/connector/routingconnector/testdata/logs/log_context/with_resource_and_scope_conditions/sink_default.yaml deleted file mode 100644 index 28fed8ee680e..000000000000 --- a/connector/routingconnector/testdata/logs/log_context/with_resource_and_scope_conditions/sink_default.yaml +++ /dev/null @@ -1,111 +0,0 @@ -resourceLogs: - - resource: - attributes: - - key: resourceName - value: - stringValue: resourceA - - key: resourceNameAgain - value: - stringValue: resourceA - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scopeLogs: - - attributes: - - key: scopeName - value: - stringValue: scopeA - - key: scopeNameAgain - value: - stringValue: scopeA - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeA - version: v0.1.0 - - attributes: - - key: scopeName - value: - stringValue: scopeB - - key: scopeNameAgain - value: - stringValue: scopeB - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeB - version: v0.1.0 - - resource: - attributes: - - key: resourceName - value: - stringValue: resourceB - - key: resourceNameAgain - value: - stringValue: resourceB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scopeLogs: - - attributes: - - key: scopeName - value: - stringValue: scopeB - - key: scopeNameAgain - value: - stringValue: scopeB - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeB - version: v0.1.0 diff --git a/connector/routingconnector/testdata/logs/log_context/with_resource_condition/config.yaml b/connector/routingconnector/testdata/logs/log_context/with_resource_condition/config.yaml deleted file mode 100644 index 1907cfd8cd0e..000000000000 --- a/connector/routingconnector/testdata/logs/log_context/with_resource_condition/config.yaml +++ /dev/null @@ -1,13 +0,0 @@ -routing: - match_once: true - default_pipelines: - - logs/default - table: - - context: log - condition: resource.attributes["resourceName"] == "resourceB" and attributes["logName"] != nil - pipelines: - - logs/0 - - context: log - condition: attributes["logName"] == "logY" - pipelines: - - logs/1 diff --git a/connector/routingconnector/testdata/logs/log_context/with_resource_condition/sink_0.yaml b/connector/routingconnector/testdata/logs/log_context/with_resource_condition/sink_0.yaml deleted file mode 100644 index 28a5a7c8b0f5..000000000000 --- a/connector/routingconnector/testdata/logs/log_context/with_resource_condition/sink_0.yaml +++ /dev/null @@ -1,71 +0,0 @@ -resourceLogs: - - resource: - attributes: - - key: resourceName - value: - stringValue: resourceB - - key: resourceNameAgain - value: - stringValue: resourceB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scopeLogs: - - attributes: - - key: scopeName - value: - stringValue: scopeA - - key: scopeNameAgain - value: - stringValue: scopeA - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeA - version: v0.1.0 - - attributes: - - key: scopeName - value: - stringValue: scopeB - - key: scopeNameAgain - value: - stringValue: scopeB - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeB - version: v0.1.0 diff --git a/connector/routingconnector/testdata/logs/log_context/with_resource_condition/sink_default.yaml b/connector/routingconnector/testdata/logs/log_context/with_resource_condition/sink_default.yaml deleted file mode 100644 index 72f617672bf3..000000000000 --- a/connector/routingconnector/testdata/logs/log_context/with_resource_condition/sink_default.yaml +++ /dev/null @@ -1,71 +0,0 @@ -resourceLogs: - - resource: - attributes: - - key: resourceName - value: - stringValue: resourceA - - key: resourceNameAgain - value: - stringValue: resourceA - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scopeLogs: - - attributes: - - key: scopeName - value: - stringValue: scopeA - - key: scopeNameAgain - value: - stringValue: scopeA - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeA - version: v0.1.0 - - attributes: - - key: scopeName - value: - stringValue: scopeB - - key: scopeNameAgain - value: - stringValue: scopeB - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeB - version: v0.1.0 diff --git a/connector/routingconnector/testdata/logs/log_context/with_scope_condition/config.yaml b/connector/routingconnector/testdata/logs/log_context/with_scope_condition/config.yaml deleted file mode 100644 index 1b6eeba670b4..000000000000 --- a/connector/routingconnector/testdata/logs/log_context/with_scope_condition/config.yaml +++ /dev/null @@ -1,13 +0,0 @@ -routing: - match_once: true - default_pipelines: - - logs/default - table: - - context: log - condition: instrumentation_scope.name == "scopeB" and attributes["logName"] != nil - pipelines: - - logs/0 - - context: log - condition: attributes["logName"] == "logY" - pipelines: - - logs/1 diff --git a/connector/routingconnector/testdata/logs/log_context/with_scope_condition/sink_0.yaml b/connector/routingconnector/testdata/logs/log_context/with_scope_condition/sink_0.yaml deleted file mode 100644 index 8c8745158e33..000000000000 --- a/connector/routingconnector/testdata/logs/log_context/with_scope_condition/sink_0.yaml +++ /dev/null @@ -1,81 +0,0 @@ -resourceLogs: - - resource: - attributes: - - key: resourceName - value: - stringValue: resourceA - - key: resourceNameAgain - value: - stringValue: resourceA - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scopeLogs: - - attributes: - - key: scopeName - value: - stringValue: scopeB - - key: scopeNameAgain - value: - stringValue: scopeB - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeB - version: v0.1.0 - - resource: - attributes: - - key: resourceName - value: - stringValue: resourceB - - key: resourceNameAgain - value: - stringValue: resourceB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scopeLogs: - - attributes: - - key: scopeName - value: - stringValue: scopeB - - key: scopeNameAgain - value: - stringValue: scopeB - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeB - version: v0.1.0 diff --git a/connector/routingconnector/testdata/logs/log_context/with_scope_condition/sink_default.yaml b/connector/routingconnector/testdata/logs/log_context/with_scope_condition/sink_default.yaml deleted file mode 100644 index 71ca02311582..000000000000 --- a/connector/routingconnector/testdata/logs/log_context/with_scope_condition/sink_default.yaml +++ /dev/null @@ -1,81 +0,0 @@ -resourceLogs: - - resource: - attributes: - - key: resourceName - value: - stringValue: resourceA - - key: resourceNameAgain - value: - stringValue: resourceA - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scopeLogs: - - attributes: - - key: scopeName - value: - stringValue: scopeA - - key: scopeNameAgain - value: - stringValue: scopeA - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeA - version: v0.1.0 - - resource: - attributes: - - key: resourceName - value: - stringValue: resourceB - - key: resourceNameAgain - value: - stringValue: resourceB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scopeLogs: - - attributes: - - key: scopeName - value: - stringValue: scopeA - - key: scopeNameAgain - value: - stringValue: scopeA - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeA - version: v0.1.0 diff --git a/connector/routingconnector/testdata/logs/mixed_context/match_logs_then_grpc_request/config.yaml b/connector/routingconnector/testdata/logs/mixed_context/match_logs_then_grpc_request/config.yaml deleted file mode 100644 index 3e2efcabe42f..000000000000 --- a/connector/routingconnector/testdata/logs/mixed_context/match_logs_then_grpc_request/config.yaml +++ /dev/null @@ -1,13 +0,0 @@ -routing: - match_once: true - default_pipelines: - - logs/default - table: - - context: log - condition: attributes["logName"] == "logA" - pipelines: - - logs/0 - - context: request - condition: request["X-Tenant"] == "acme" - pipelines: - - logs/1 diff --git a/connector/routingconnector/testdata/logs/mixed_context/match_logs_then_grpc_request/request.yaml b/connector/routingconnector/testdata/logs/mixed_context/match_logs_then_grpc_request/request.yaml deleted file mode 100644 index 748e7f0766bb..000000000000 --- a/connector/routingconnector/testdata/logs/mixed_context/match_logs_then_grpc_request/request.yaml +++ /dev/null @@ -1,2 +0,0 @@ -grpc: - X-Tenant: acme \ No newline at end of file diff --git a/connector/routingconnector/testdata/logs/mixed_context/match_logs_then_grpc_request/sink_0.yaml b/connector/routingconnector/testdata/logs/mixed_context/match_logs_then_grpc_request/sink_0.yaml deleted file mode 100644 index 39604c6017d6..000000000000 --- a/connector/routingconnector/testdata/logs/mixed_context/match_logs_then_grpc_request/sink_0.yaml +++ /dev/null @@ -1,105 +0,0 @@ -resourceLogs: - - resource: - attributes: - - key: resourceName - value: - stringValue: resourceA - - key: resourceNameAgain - value: - stringValue: resourceA - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scopeLogs: - - attributes: - - key: scopeName - value: - stringValue: scopeA - - key: scopeNameAgain - value: - stringValue: scopeA - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeA - version: v0.1.0 - - attributes: - - key: scopeName - value: - stringValue: scopeB - - key: scopeNameAgain - value: - stringValue: scopeB - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeB - version: v0.1.0 - - resource: - attributes: - - key: resourceName - value: - stringValue: resourceB - - key: resourceNameAgain - value: - stringValue: resourceB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scopeLogs: - - attributes: - - key: scopeName - value: - stringValue: scopeA - - key: scopeNameAgain - value: - stringValue: scopeA - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeA - version: v0.1.0 - - attributes: - - key: scopeName - value: - stringValue: scopeB - - key: scopeNameAgain - value: - stringValue: scopeB - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeB - version: v0.1.0 diff --git a/connector/routingconnector/testdata/logs/mixed_context/match_logs_then_grpc_request/sink_1.yaml b/connector/routingconnector/testdata/logs/mixed_context/match_logs_then_grpc_request/sink_1.yaml deleted file mode 100644 index c6c0fa65fcc0..000000000000 --- a/connector/routingconnector/testdata/logs/mixed_context/match_logs_then_grpc_request/sink_1.yaml +++ /dev/null @@ -1,105 +0,0 @@ -resourceLogs: - - resource: - attributes: - - key: resourceName - value: - stringValue: resourceA - - key: resourceNameAgain - value: - stringValue: resourceA - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scopeLogs: - - attributes: - - key: scopeName - value: - stringValue: scopeA - - key: scopeNameAgain - value: - stringValue: scopeA - logRecords: - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeA - version: v0.1.0 - - attributes: - - key: scopeName - value: - stringValue: scopeB - - key: scopeNameAgain - value: - stringValue: scopeB - logRecords: - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeB - version: v0.1.0 - - resource: - attributes: - - key: resourceName - value: - stringValue: resourceB - - key: resourceNameAgain - value: - stringValue: resourceB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scopeLogs: - - attributes: - - key: scopeName - value: - stringValue: scopeA - - key: scopeNameAgain - value: - stringValue: scopeA - logRecords: - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeA - version: v0.1.0 - - attributes: - - key: scopeName - value: - stringValue: scopeB - - key: scopeNameAgain - value: - stringValue: scopeB - logRecords: - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeB - version: v0.1.0 diff --git a/connector/routingconnector/testdata/logs/mixed_context/match_logs_then_http_request/config.yaml b/connector/routingconnector/testdata/logs/mixed_context/match_logs_then_http_request/config.yaml deleted file mode 100644 index 3e2efcabe42f..000000000000 --- a/connector/routingconnector/testdata/logs/mixed_context/match_logs_then_http_request/config.yaml +++ /dev/null @@ -1,13 +0,0 @@ -routing: - match_once: true - default_pipelines: - - logs/default - table: - - context: log - condition: attributes["logName"] == "logA" - pipelines: - - logs/0 - - context: request - condition: request["X-Tenant"] == "acme" - pipelines: - - logs/1 diff --git a/connector/routingconnector/testdata/logs/mixed_context/match_logs_then_http_request/request.yaml b/connector/routingconnector/testdata/logs/mixed_context/match_logs_then_http_request/request.yaml deleted file mode 100644 index a7f3371211d1..000000000000 --- a/connector/routingconnector/testdata/logs/mixed_context/match_logs_then_http_request/request.yaml +++ /dev/null @@ -1,2 +0,0 @@ -http: - X-Tenant: [ acme ] \ No newline at end of file diff --git a/connector/routingconnector/testdata/logs/mixed_context/match_logs_then_http_request/sink_0.yaml b/connector/routingconnector/testdata/logs/mixed_context/match_logs_then_http_request/sink_0.yaml deleted file mode 100644 index 39604c6017d6..000000000000 --- a/connector/routingconnector/testdata/logs/mixed_context/match_logs_then_http_request/sink_0.yaml +++ /dev/null @@ -1,105 +0,0 @@ -resourceLogs: - - resource: - attributes: - - key: resourceName - value: - stringValue: resourceA - - key: resourceNameAgain - value: - stringValue: resourceA - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scopeLogs: - - attributes: - - key: scopeName - value: - stringValue: scopeA - - key: scopeNameAgain - value: - stringValue: scopeA - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeA - version: v0.1.0 - - attributes: - - key: scopeName - value: - stringValue: scopeB - - key: scopeNameAgain - value: - stringValue: scopeB - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeB - version: v0.1.0 - - resource: - attributes: - - key: resourceName - value: - stringValue: resourceB - - key: resourceNameAgain - value: - stringValue: resourceB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scopeLogs: - - attributes: - - key: scopeName - value: - stringValue: scopeA - - key: scopeNameAgain - value: - stringValue: scopeA - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeA - version: v0.1.0 - - attributes: - - key: scopeName - value: - stringValue: scopeB - - key: scopeNameAgain - value: - stringValue: scopeB - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeB - version: v0.1.0 diff --git a/connector/routingconnector/testdata/logs/mixed_context/match_logs_then_http_request/sink_1.yaml b/connector/routingconnector/testdata/logs/mixed_context/match_logs_then_http_request/sink_1.yaml deleted file mode 100644 index c6c0fa65fcc0..000000000000 --- a/connector/routingconnector/testdata/logs/mixed_context/match_logs_then_http_request/sink_1.yaml +++ /dev/null @@ -1,105 +0,0 @@ -resourceLogs: - - resource: - attributes: - - key: resourceName - value: - stringValue: resourceA - - key: resourceNameAgain - value: - stringValue: resourceA - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scopeLogs: - - attributes: - - key: scopeName - value: - stringValue: scopeA - - key: scopeNameAgain - value: - stringValue: scopeA - logRecords: - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeA - version: v0.1.0 - - attributes: - - key: scopeName - value: - stringValue: scopeB - - key: scopeNameAgain - value: - stringValue: scopeB - logRecords: - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeB - version: v0.1.0 - - resource: - attributes: - - key: resourceName - value: - stringValue: resourceB - - key: resourceNameAgain - value: - stringValue: resourceB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scopeLogs: - - attributes: - - key: scopeName - value: - stringValue: scopeA - - key: scopeNameAgain - value: - stringValue: scopeA - logRecords: - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeA - version: v0.1.0 - - attributes: - - key: scopeName - value: - stringValue: scopeB - - key: scopeNameAgain - value: - stringValue: scopeB - logRecords: - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeB - version: v0.1.0 diff --git a/connector/routingconnector/testdata/logs/mixed_context/match_logs_then_resource/config.yaml b/connector/routingconnector/testdata/logs/mixed_context/match_logs_then_resource/config.yaml deleted file mode 100644 index 14fc87417bf2..000000000000 --- a/connector/routingconnector/testdata/logs/mixed_context/match_logs_then_resource/config.yaml +++ /dev/null @@ -1,13 +0,0 @@ -routing: - match_once: true - default_pipelines: - - logs/default - table: - - context: log - condition: attributes["logName"] == "logA" - pipelines: - - logs/0 - - context: resource - condition: attributes["resourceName"] == "resourceB" - pipelines: - - logs/1 diff --git a/connector/routingconnector/testdata/logs/mixed_context/match_logs_then_resource/sink_0.yaml b/connector/routingconnector/testdata/logs/mixed_context/match_logs_then_resource/sink_0.yaml deleted file mode 100644 index 39604c6017d6..000000000000 --- a/connector/routingconnector/testdata/logs/mixed_context/match_logs_then_resource/sink_0.yaml +++ /dev/null @@ -1,105 +0,0 @@ -resourceLogs: - - resource: - attributes: - - key: resourceName - value: - stringValue: resourceA - - key: resourceNameAgain - value: - stringValue: resourceA - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scopeLogs: - - attributes: - - key: scopeName - value: - stringValue: scopeA - - key: scopeNameAgain - value: - stringValue: scopeA - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeA - version: v0.1.0 - - attributes: - - key: scopeName - value: - stringValue: scopeB - - key: scopeNameAgain - value: - stringValue: scopeB - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeB - version: v0.1.0 - - resource: - attributes: - - key: resourceName - value: - stringValue: resourceB - - key: resourceNameAgain - value: - stringValue: resourceB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scopeLogs: - - attributes: - - key: scopeName - value: - stringValue: scopeA - - key: scopeNameAgain - value: - stringValue: scopeA - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeA - version: v0.1.0 - - attributes: - - key: scopeName - value: - stringValue: scopeB - - key: scopeNameAgain - value: - stringValue: scopeB - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeB - version: v0.1.0 diff --git a/connector/routingconnector/testdata/logs/mixed_context/match_logs_then_resource/sink_1.yaml b/connector/routingconnector/testdata/logs/mixed_context/match_logs_then_resource/sink_1.yaml deleted file mode 100644 index ba61f2992fbf..000000000000 --- a/connector/routingconnector/testdata/logs/mixed_context/match_logs_then_resource/sink_1.yaml +++ /dev/null @@ -1,53 +0,0 @@ -resourceLogs: - - resource: - attributes: - - key: resourceName - value: - stringValue: resourceB - - key: resourceNameAgain - value: - stringValue: resourceB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scopeLogs: - - attributes: - - key: scopeName - value: - stringValue: scopeA - - key: scopeNameAgain - value: - stringValue: scopeA - logRecords: - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeA - version: v0.1.0 - - attributes: - - key: scopeName - value: - stringValue: scopeB - - key: scopeNameAgain - value: - stringValue: scopeB - logRecords: - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeB - version: v0.1.0 diff --git a/connector/routingconnector/testdata/logs/mixed_context/match_logs_then_resource/sink_default.yaml b/connector/routingconnector/testdata/logs/mixed_context/match_logs_then_resource/sink_default.yaml deleted file mode 100644 index b20626892e83..000000000000 --- a/connector/routingconnector/testdata/logs/mixed_context/match_logs_then_resource/sink_default.yaml +++ /dev/null @@ -1,53 +0,0 @@ -resourceLogs: - - resource: - attributes: - - key: resourceName - value: - stringValue: resourceA - - key: resourceNameAgain - value: - stringValue: resourceA - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scopeLogs: - - attributes: - - key: scopeName - value: - stringValue: scopeA - - key: scopeNameAgain - value: - stringValue: scopeA - logRecords: - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeA - version: v0.1.0 - - attributes: - - key: scopeName - value: - stringValue: scopeB - - key: scopeNameAgain - value: - stringValue: scopeB - logRecords: - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeB - version: v0.1.0 \ No newline at end of file diff --git a/connector/routingconnector/testdata/logs/mixed_context/match_resource_then_grpc_request/config.yaml b/connector/routingconnector/testdata/logs/mixed_context/match_resource_then_grpc_request/config.yaml deleted file mode 100644 index c8001bebb625..000000000000 --- a/connector/routingconnector/testdata/logs/mixed_context/match_resource_then_grpc_request/config.yaml +++ /dev/null @@ -1,13 +0,0 @@ -routing: - match_once: true - default_pipelines: - - logs/default - table: - - context: resource - condition: attributes["resourceName"] == "resourceA" - pipelines: - - logs/0 - - context: request - condition: request["X-Tenant"] == "acme" - pipelines: - - logs/1 diff --git a/connector/routingconnector/testdata/logs/mixed_context/match_resource_then_grpc_request/request.yaml b/connector/routingconnector/testdata/logs/mixed_context/match_resource_then_grpc_request/request.yaml deleted file mode 100644 index 748e7f0766bb..000000000000 --- a/connector/routingconnector/testdata/logs/mixed_context/match_resource_then_grpc_request/request.yaml +++ /dev/null @@ -1,2 +0,0 @@ -grpc: - X-Tenant: acme \ No newline at end of file diff --git a/connector/routingconnector/testdata/logs/mixed_context/match_resource_then_grpc_request/sink_0.yaml b/connector/routingconnector/testdata/logs/mixed_context/match_resource_then_grpc_request/sink_0.yaml deleted file mode 100644 index ef36119ae039..000000000000 --- a/connector/routingconnector/testdata/logs/mixed_context/match_resource_then_grpc_request/sink_0.yaml +++ /dev/null @@ -1,72 +0,0 @@ -resourceLogs: - - resource: - attributes: - - key: resourceName - value: - stringValue: resourceA - - key: resourceNameAgain - value: - stringValue: resourceA - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scopeLogs: - - attributes: - - key: scopeName - value: - stringValue: scopeA - - key: scopeNameAgain - value: - stringValue: scopeA - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeA - version: v0.1.0 - - attributes: - - key: scopeName - value: - stringValue: scopeB - - key: scopeNameAgain - value: - stringValue: scopeB - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeB - version: v0.1.0 - diff --git a/connector/routingconnector/testdata/logs/mixed_context/match_resource_then_grpc_request/sink_1.yaml b/connector/routingconnector/testdata/logs/mixed_context/match_resource_then_grpc_request/sink_1.yaml deleted file mode 100644 index 28a5a7c8b0f5..000000000000 --- a/connector/routingconnector/testdata/logs/mixed_context/match_resource_then_grpc_request/sink_1.yaml +++ /dev/null @@ -1,71 +0,0 @@ -resourceLogs: - - resource: - attributes: - - key: resourceName - value: - stringValue: resourceB - - key: resourceNameAgain - value: - stringValue: resourceB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scopeLogs: - - attributes: - - key: scopeName - value: - stringValue: scopeA - - key: scopeNameAgain - value: - stringValue: scopeA - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeA - version: v0.1.0 - - attributes: - - key: scopeName - value: - stringValue: scopeB - - key: scopeNameAgain - value: - stringValue: scopeB - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeB - version: v0.1.0 diff --git a/connector/routingconnector/testdata/logs/mixed_context/match_resource_then_http_request/config.yaml b/connector/routingconnector/testdata/logs/mixed_context/match_resource_then_http_request/config.yaml deleted file mode 100644 index c8001bebb625..000000000000 --- a/connector/routingconnector/testdata/logs/mixed_context/match_resource_then_http_request/config.yaml +++ /dev/null @@ -1,13 +0,0 @@ -routing: - match_once: true - default_pipelines: - - logs/default - table: - - context: resource - condition: attributes["resourceName"] == "resourceA" - pipelines: - - logs/0 - - context: request - condition: request["X-Tenant"] == "acme" - pipelines: - - logs/1 diff --git a/connector/routingconnector/testdata/logs/mixed_context/match_resource_then_http_request/request.yaml b/connector/routingconnector/testdata/logs/mixed_context/match_resource_then_http_request/request.yaml deleted file mode 100644 index a7f3371211d1..000000000000 --- a/connector/routingconnector/testdata/logs/mixed_context/match_resource_then_http_request/request.yaml +++ /dev/null @@ -1,2 +0,0 @@ -http: - X-Tenant: [ acme ] \ No newline at end of file diff --git a/connector/routingconnector/testdata/logs/mixed_context/match_resource_then_http_request/sink_0.yaml b/connector/routingconnector/testdata/logs/mixed_context/match_resource_then_http_request/sink_0.yaml deleted file mode 100644 index ef36119ae039..000000000000 --- a/connector/routingconnector/testdata/logs/mixed_context/match_resource_then_http_request/sink_0.yaml +++ /dev/null @@ -1,72 +0,0 @@ -resourceLogs: - - resource: - attributes: - - key: resourceName - value: - stringValue: resourceA - - key: resourceNameAgain - value: - stringValue: resourceA - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scopeLogs: - - attributes: - - key: scopeName - value: - stringValue: scopeA - - key: scopeNameAgain - value: - stringValue: scopeA - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeA - version: v0.1.0 - - attributes: - - key: scopeName - value: - stringValue: scopeB - - key: scopeNameAgain - value: - stringValue: scopeB - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeB - version: v0.1.0 - diff --git a/connector/routingconnector/testdata/logs/mixed_context/match_resource_then_http_request/sink_1.yaml b/connector/routingconnector/testdata/logs/mixed_context/match_resource_then_http_request/sink_1.yaml deleted file mode 100644 index 28a5a7c8b0f5..000000000000 --- a/connector/routingconnector/testdata/logs/mixed_context/match_resource_then_http_request/sink_1.yaml +++ /dev/null @@ -1,71 +0,0 @@ -resourceLogs: - - resource: - attributes: - - key: resourceName - value: - stringValue: resourceB - - key: resourceNameAgain - value: - stringValue: resourceB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scopeLogs: - - attributes: - - key: scopeName - value: - stringValue: scopeA - - key: scopeNameAgain - value: - stringValue: scopeA - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeA - version: v0.1.0 - - attributes: - - key: scopeName - value: - stringValue: scopeB - - key: scopeNameAgain - value: - stringValue: scopeB - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeB - version: v0.1.0 diff --git a/connector/routingconnector/testdata/logs/mixed_context/match_resource_then_logs/config.yaml b/connector/routingconnector/testdata/logs/mixed_context/match_resource_then_logs/config.yaml deleted file mode 100644 index ab15a654b35a..000000000000 --- a/connector/routingconnector/testdata/logs/mixed_context/match_resource_then_logs/config.yaml +++ /dev/null @@ -1,13 +0,0 @@ -routing: - match_once: true - default_pipelines: - - logs/default - table: - - context: resource - condition: attributes["resourceName"] == "resourceA" - pipelines: - - logs/0 - - context: log - condition: attributes["logName"] == "logB" - pipelines: - - logs/1 diff --git a/connector/routingconnector/testdata/logs/mixed_context/match_resource_then_logs/sink_0.yaml b/connector/routingconnector/testdata/logs/mixed_context/match_resource_then_logs/sink_0.yaml deleted file mode 100644 index 72f617672bf3..000000000000 --- a/connector/routingconnector/testdata/logs/mixed_context/match_resource_then_logs/sink_0.yaml +++ /dev/null @@ -1,71 +0,0 @@ -resourceLogs: - - resource: - attributes: - - key: resourceName - value: - stringValue: resourceA - - key: resourceNameAgain - value: - stringValue: resourceA - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scopeLogs: - - attributes: - - key: scopeName - value: - stringValue: scopeA - - key: scopeNameAgain - value: - stringValue: scopeA - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeA - version: v0.1.0 - - attributes: - - key: scopeName - value: - stringValue: scopeB - - key: scopeNameAgain - value: - stringValue: scopeB - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeB - version: v0.1.0 diff --git a/connector/routingconnector/testdata/logs/mixed_context/match_resource_then_logs/sink_1.yaml b/connector/routingconnector/testdata/logs/mixed_context/match_resource_then_logs/sink_1.yaml deleted file mode 100644 index ba61f2992fbf..000000000000 --- a/connector/routingconnector/testdata/logs/mixed_context/match_resource_then_logs/sink_1.yaml +++ /dev/null @@ -1,53 +0,0 @@ -resourceLogs: - - resource: - attributes: - - key: resourceName - value: - stringValue: resourceB - - key: resourceNameAgain - value: - stringValue: resourceB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scopeLogs: - - attributes: - - key: scopeName - value: - stringValue: scopeA - - key: scopeNameAgain - value: - stringValue: scopeA - logRecords: - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeA - version: v0.1.0 - - attributes: - - key: scopeName - value: - stringValue: scopeB - - key: scopeNameAgain - value: - stringValue: scopeB - logRecords: - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeB - version: v0.1.0 diff --git a/connector/routingconnector/testdata/logs/mixed_context/match_resource_then_logs/sink_default.yaml b/connector/routingconnector/testdata/logs/mixed_context/match_resource_then_logs/sink_default.yaml deleted file mode 100644 index a2e7ef72f97e..000000000000 --- a/connector/routingconnector/testdata/logs/mixed_context/match_resource_then_logs/sink_default.yaml +++ /dev/null @@ -1,53 +0,0 @@ -resourceLogs: - - resource: - attributes: - - key: resourceName - value: - stringValue: resourceB - - key: resourceNameAgain - value: - stringValue: resourceB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scopeLogs: - - attributes: - - key: scopeName - value: - stringValue: scopeA - - key: scopeNameAgain - value: - stringValue: scopeA - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeA - version: v0.1.0 - - attributes: - - key: scopeName - value: - stringValue: scopeB - - key: scopeNameAgain - value: - stringValue: scopeB - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeB - version: v0.1.0 diff --git a/connector/routingconnector/testdata/logs/request_context/match_any_value/config.yaml b/connector/routingconnector/testdata/logs/request_context/match_any_value/config.yaml deleted file mode 100644 index 9e933da85e60..000000000000 --- a/connector/routingconnector/testdata/logs/request_context/match_any_value/config.yaml +++ /dev/null @@ -1,9 +0,0 @@ -routing: - match_once: true - default_pipelines: - - logs/default - table: - - context: request - condition: request["X-Tenant"] == "acme" - pipelines: - - logs/0 diff --git a/connector/routingconnector/testdata/logs/request_context/match_any_value/request.yaml b/connector/routingconnector/testdata/logs/request_context/match_any_value/request.yaml deleted file mode 100644 index 72641a092459..000000000000 --- a/connector/routingconnector/testdata/logs/request_context/match_any_value/request.yaml +++ /dev/null @@ -1,4 +0,0 @@ -grpc: - X-Tenant: notacme -http: - X-Tenant: [ notacme, acme ] \ No newline at end of file diff --git a/connector/routingconnector/testdata/logs/request_context/match_any_value/sink_0.yaml b/connector/routingconnector/testdata/logs/request_context/match_any_value/sink_0.yaml deleted file mode 100644 index 63c6eada6cf9..000000000000 --- a/connector/routingconnector/testdata/logs/request_context/match_any_value/sink_0.yaml +++ /dev/null @@ -1,141 +0,0 @@ -resourceLogs: - - resource: - attributes: - - key: resourceName - value: - stringValue: resourceA - - key: resourceNameAgain - value: - stringValue: resourceA - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scopeLogs: - - attributes: - - key: scopeName - value: - stringValue: scopeA - - key: scopeNameAgain - value: - stringValue: scopeA - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeA - version: v0.1.0 - - attributes: - - key: scopeName - value: - stringValue: scopeB - - key: scopeNameAgain - value: - stringValue: scopeB - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeB - version: v0.1.0 - - resource: - attributes: - - key: resourceName - value: - stringValue: resourceB - - key: resourceNameAgain - value: - stringValue: resourceB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scopeLogs: - - attributes: - - key: scopeName - value: - stringValue: scopeA - - key: scopeNameAgain - value: - stringValue: scopeA - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeA - version: v0.1.0 - - attributes: - - key: scopeName - value: - stringValue: scopeB - - key: scopeNameAgain - value: - stringValue: scopeB - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeB - version: v0.1.0 diff --git a/connector/routingconnector/testdata/logs/request_context/match_grpc_value/config.yaml b/connector/routingconnector/testdata/logs/request_context/match_grpc_value/config.yaml deleted file mode 100644 index 9e933da85e60..000000000000 --- a/connector/routingconnector/testdata/logs/request_context/match_grpc_value/config.yaml +++ /dev/null @@ -1,9 +0,0 @@ -routing: - match_once: true - default_pipelines: - - logs/default - table: - - context: request - condition: request["X-Tenant"] == "acme" - pipelines: - - logs/0 diff --git a/connector/routingconnector/testdata/logs/request_context/match_grpc_value/request.yaml b/connector/routingconnector/testdata/logs/request_context/match_grpc_value/request.yaml deleted file mode 100644 index 748e7f0766bb..000000000000 --- a/connector/routingconnector/testdata/logs/request_context/match_grpc_value/request.yaml +++ /dev/null @@ -1,2 +0,0 @@ -grpc: - X-Tenant: acme \ No newline at end of file diff --git a/connector/routingconnector/testdata/logs/request_context/match_grpc_value/sink_0.yaml b/connector/routingconnector/testdata/logs/request_context/match_grpc_value/sink_0.yaml deleted file mode 100644 index 63c6eada6cf9..000000000000 --- a/connector/routingconnector/testdata/logs/request_context/match_grpc_value/sink_0.yaml +++ /dev/null @@ -1,141 +0,0 @@ -resourceLogs: - - resource: - attributes: - - key: resourceName - value: - stringValue: resourceA - - key: resourceNameAgain - value: - stringValue: resourceA - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scopeLogs: - - attributes: - - key: scopeName - value: - stringValue: scopeA - - key: scopeNameAgain - value: - stringValue: scopeA - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeA - version: v0.1.0 - - attributes: - - key: scopeName - value: - stringValue: scopeB - - key: scopeNameAgain - value: - stringValue: scopeB - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeB - version: v0.1.0 - - resource: - attributes: - - key: resourceName - value: - stringValue: resourceB - - key: resourceNameAgain - value: - stringValue: resourceB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scopeLogs: - - attributes: - - key: scopeName - value: - stringValue: scopeA - - key: scopeNameAgain - value: - stringValue: scopeA - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeA - version: v0.1.0 - - attributes: - - key: scopeName - value: - stringValue: scopeB - - key: scopeNameAgain - value: - stringValue: scopeB - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeB - version: v0.1.0 diff --git a/connector/routingconnector/testdata/logs/request_context/match_http_value/config.yaml b/connector/routingconnector/testdata/logs/request_context/match_http_value/config.yaml deleted file mode 100644 index 9e933da85e60..000000000000 --- a/connector/routingconnector/testdata/logs/request_context/match_http_value/config.yaml +++ /dev/null @@ -1,9 +0,0 @@ -routing: - match_once: true - default_pipelines: - - logs/default - table: - - context: request - condition: request["X-Tenant"] == "acme" - pipelines: - - logs/0 diff --git a/connector/routingconnector/testdata/logs/request_context/match_http_value/request.yaml b/connector/routingconnector/testdata/logs/request_context/match_http_value/request.yaml deleted file mode 100644 index a7f3371211d1..000000000000 --- a/connector/routingconnector/testdata/logs/request_context/match_http_value/request.yaml +++ /dev/null @@ -1,2 +0,0 @@ -http: - X-Tenant: [ acme ] \ No newline at end of file diff --git a/connector/routingconnector/testdata/logs/request_context/match_http_value/sink_0.yaml b/connector/routingconnector/testdata/logs/request_context/match_http_value/sink_0.yaml deleted file mode 100644 index 63c6eada6cf9..000000000000 --- a/connector/routingconnector/testdata/logs/request_context/match_http_value/sink_0.yaml +++ /dev/null @@ -1,141 +0,0 @@ -resourceLogs: - - resource: - attributes: - - key: resourceName - value: - stringValue: resourceA - - key: resourceNameAgain - value: - stringValue: resourceA - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scopeLogs: - - attributes: - - key: scopeName - value: - stringValue: scopeA - - key: scopeNameAgain - value: - stringValue: scopeA - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeA - version: v0.1.0 - - attributes: - - key: scopeName - value: - stringValue: scopeB - - key: scopeNameAgain - value: - stringValue: scopeB - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeB - version: v0.1.0 - - resource: - attributes: - - key: resourceName - value: - stringValue: resourceB - - key: resourceNameAgain - value: - stringValue: resourceB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scopeLogs: - - attributes: - - key: scopeName - value: - stringValue: scopeA - - key: scopeNameAgain - value: - stringValue: scopeA - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeA - version: v0.1.0 - - attributes: - - key: scopeName - value: - stringValue: scopeB - - key: scopeNameAgain - value: - stringValue: scopeB - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeB - version: v0.1.0 diff --git a/connector/routingconnector/testdata/logs/request_context/match_http_value2/config.yaml b/connector/routingconnector/testdata/logs/request_context/match_http_value2/config.yaml deleted file mode 100644 index 9e933da85e60..000000000000 --- a/connector/routingconnector/testdata/logs/request_context/match_http_value2/config.yaml +++ /dev/null @@ -1,9 +0,0 @@ -routing: - match_once: true - default_pipelines: - - logs/default - table: - - context: request - condition: request["X-Tenant"] == "acme" - pipelines: - - logs/0 diff --git a/connector/routingconnector/testdata/logs/request_context/match_http_value2/request.yaml b/connector/routingconnector/testdata/logs/request_context/match_http_value2/request.yaml deleted file mode 100644 index 2ba6e4fe638a..000000000000 --- a/connector/routingconnector/testdata/logs/request_context/match_http_value2/request.yaml +++ /dev/null @@ -1,2 +0,0 @@ -http: - X-Tenant: [ notacme, acme ] \ No newline at end of file diff --git a/connector/routingconnector/testdata/logs/request_context/match_http_value2/sink_0.yaml b/connector/routingconnector/testdata/logs/request_context/match_http_value2/sink_0.yaml deleted file mode 100644 index 63c6eada6cf9..000000000000 --- a/connector/routingconnector/testdata/logs/request_context/match_http_value2/sink_0.yaml +++ /dev/null @@ -1,141 +0,0 @@ -resourceLogs: - - resource: - attributes: - - key: resourceName - value: - stringValue: resourceA - - key: resourceNameAgain - value: - stringValue: resourceA - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scopeLogs: - - attributes: - - key: scopeName - value: - stringValue: scopeA - - key: scopeNameAgain - value: - stringValue: scopeA - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeA - version: v0.1.0 - - attributes: - - key: scopeName - value: - stringValue: scopeB - - key: scopeNameAgain - value: - stringValue: scopeB - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeB - version: v0.1.0 - - resource: - attributes: - - key: resourceName - value: - stringValue: resourceB - - key: resourceNameAgain - value: - stringValue: resourceB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scopeLogs: - - attributes: - - key: scopeName - value: - stringValue: scopeA - - key: scopeNameAgain - value: - stringValue: scopeA - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeA - version: v0.1.0 - - attributes: - - key: scopeName - value: - stringValue: scopeB - - key: scopeNameAgain - value: - stringValue: scopeB - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeB - version: v0.1.0 diff --git a/connector/routingconnector/testdata/logs/request_context/match_no_grpc_value/config.yaml b/connector/routingconnector/testdata/logs/request_context/match_no_grpc_value/config.yaml deleted file mode 100644 index 9e933da85e60..000000000000 --- a/connector/routingconnector/testdata/logs/request_context/match_no_grpc_value/config.yaml +++ /dev/null @@ -1,9 +0,0 @@ -routing: - match_once: true - default_pipelines: - - logs/default - table: - - context: request - condition: request["X-Tenant"] == "acme" - pipelines: - - logs/0 diff --git a/connector/routingconnector/testdata/logs/request_context/match_no_grpc_value/request.yaml b/connector/routingconnector/testdata/logs/request_context/match_no_grpc_value/request.yaml deleted file mode 100644 index a55ab1e40f90..000000000000 --- a/connector/routingconnector/testdata/logs/request_context/match_no_grpc_value/request.yaml +++ /dev/null @@ -1,2 +0,0 @@ -grpc: - X-Tenant: notacme \ No newline at end of file diff --git a/connector/routingconnector/testdata/logs/request_context/match_no_grpc_value/sink_default.yaml b/connector/routingconnector/testdata/logs/request_context/match_no_grpc_value/sink_default.yaml deleted file mode 100644 index 63c6eada6cf9..000000000000 --- a/connector/routingconnector/testdata/logs/request_context/match_no_grpc_value/sink_default.yaml +++ /dev/null @@ -1,141 +0,0 @@ -resourceLogs: - - resource: - attributes: - - key: resourceName - value: - stringValue: resourceA - - key: resourceNameAgain - value: - stringValue: resourceA - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scopeLogs: - - attributes: - - key: scopeName - value: - stringValue: scopeA - - key: scopeNameAgain - value: - stringValue: scopeA - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeA - version: v0.1.0 - - attributes: - - key: scopeName - value: - stringValue: scopeB - - key: scopeNameAgain - value: - stringValue: scopeB - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeB - version: v0.1.0 - - resource: - attributes: - - key: resourceName - value: - stringValue: resourceB - - key: resourceNameAgain - value: - stringValue: resourceB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scopeLogs: - - attributes: - - key: scopeName - value: - stringValue: scopeA - - key: scopeNameAgain - value: - stringValue: scopeA - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeA - version: v0.1.0 - - attributes: - - key: scopeName - value: - stringValue: scopeB - - key: scopeNameAgain - value: - stringValue: scopeB - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeB - version: v0.1.0 diff --git a/connector/routingconnector/testdata/logs/request_context/match_no_http_value/config.yaml b/connector/routingconnector/testdata/logs/request_context/match_no_http_value/config.yaml deleted file mode 100644 index 9e933da85e60..000000000000 --- a/connector/routingconnector/testdata/logs/request_context/match_no_http_value/config.yaml +++ /dev/null @@ -1,9 +0,0 @@ -routing: - match_once: true - default_pipelines: - - logs/default - table: - - context: request - condition: request["X-Tenant"] == "acme" - pipelines: - - logs/0 diff --git a/connector/routingconnector/testdata/logs/request_context/match_no_http_value/request.yaml b/connector/routingconnector/testdata/logs/request_context/match_no_http_value/request.yaml deleted file mode 100644 index 78ac5d79c4a3..000000000000 --- a/connector/routingconnector/testdata/logs/request_context/match_no_http_value/request.yaml +++ /dev/null @@ -1,2 +0,0 @@ -http: - X-Tenant: [ notacme ] \ No newline at end of file diff --git a/connector/routingconnector/testdata/logs/request_context/match_no_http_value/sink_default.yaml b/connector/routingconnector/testdata/logs/request_context/match_no_http_value/sink_default.yaml deleted file mode 100644 index 63c6eada6cf9..000000000000 --- a/connector/routingconnector/testdata/logs/request_context/match_no_http_value/sink_default.yaml +++ /dev/null @@ -1,141 +0,0 @@ -resourceLogs: - - resource: - attributes: - - key: resourceName - value: - stringValue: resourceA - - key: resourceNameAgain - value: - stringValue: resourceA - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scopeLogs: - - attributes: - - key: scopeName - value: - stringValue: scopeA - - key: scopeNameAgain - value: - stringValue: scopeA - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeA - version: v0.1.0 - - attributes: - - key: scopeName - value: - stringValue: scopeB - - key: scopeNameAgain - value: - stringValue: scopeB - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeB - version: v0.1.0 - - resource: - attributes: - - key: resourceName - value: - stringValue: resourceB - - key: resourceNameAgain - value: - stringValue: resourceB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scopeLogs: - - attributes: - - key: scopeName - value: - stringValue: scopeA - - key: scopeNameAgain - value: - stringValue: scopeA - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeA - version: v0.1.0 - - attributes: - - key: scopeName - value: - stringValue: scopeB - - key: scopeNameAgain - value: - stringValue: scopeB - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeB - version: v0.1.0 diff --git a/connector/routingconnector/testdata/logs/request_context/no_request_values/config.yaml b/connector/routingconnector/testdata/logs/request_context/no_request_values/config.yaml deleted file mode 100644 index 9e933da85e60..000000000000 --- a/connector/routingconnector/testdata/logs/request_context/no_request_values/config.yaml +++ /dev/null @@ -1,9 +0,0 @@ -routing: - match_once: true - default_pipelines: - - logs/default - table: - - context: request - condition: request["X-Tenant"] == "acme" - pipelines: - - logs/0 diff --git a/connector/routingconnector/testdata/logs/request_context/no_request_values/sink_default.yaml b/connector/routingconnector/testdata/logs/request_context/no_request_values/sink_default.yaml deleted file mode 100644 index 63c6eada6cf9..000000000000 --- a/connector/routingconnector/testdata/logs/request_context/no_request_values/sink_default.yaml +++ /dev/null @@ -1,141 +0,0 @@ -resourceLogs: - - resource: - attributes: - - key: resourceName - value: - stringValue: resourceA - - key: resourceNameAgain - value: - stringValue: resourceA - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scopeLogs: - - attributes: - - key: scopeName - value: - stringValue: scopeA - - key: scopeNameAgain - value: - stringValue: scopeA - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeA - version: v0.1.0 - - attributes: - - key: scopeName - value: - stringValue: scopeB - - key: scopeNameAgain - value: - stringValue: scopeB - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeB - version: v0.1.0 - - resource: - attributes: - - key: resourceName - value: - stringValue: resourceB - - key: resourceNameAgain - value: - stringValue: resourceB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scopeLogs: - - attributes: - - key: scopeName - value: - stringValue: scopeA - - key: scopeNameAgain - value: - stringValue: scopeA - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeA - version: v0.1.0 - - attributes: - - key: scopeName - value: - stringValue: scopeB - - key: scopeNameAgain - value: - stringValue: scopeB - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeB - version: v0.1.0 diff --git a/connector/routingconnector/testdata/logs/resource_context/all_match_first_only/config.yaml b/connector/routingconnector/testdata/logs/resource_context/all_match_first_only/config.yaml deleted file mode 100644 index 0c6ae0f17eca..000000000000 --- a/connector/routingconnector/testdata/logs/resource_context/all_match_first_only/config.yaml +++ /dev/null @@ -1,10 +0,0 @@ -routing: - default_pipelines: - - logs/default - table: - - condition: attributes["resourceName"] != nil - pipelines: - - logs/0 - - condition: attributes["resourceName"] == "resourceY" - pipelines: - - logs/1 diff --git a/connector/routingconnector/testdata/logs/resource_context/all_match_first_only/sink_0.yaml b/connector/routingconnector/testdata/logs/resource_context/all_match_first_only/sink_0.yaml deleted file mode 100644 index 63c6eada6cf9..000000000000 --- a/connector/routingconnector/testdata/logs/resource_context/all_match_first_only/sink_0.yaml +++ /dev/null @@ -1,141 +0,0 @@ -resourceLogs: - - resource: - attributes: - - key: resourceName - value: - stringValue: resourceA - - key: resourceNameAgain - value: - stringValue: resourceA - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scopeLogs: - - attributes: - - key: scopeName - value: - stringValue: scopeA - - key: scopeNameAgain - value: - stringValue: scopeA - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeA - version: v0.1.0 - - attributes: - - key: scopeName - value: - stringValue: scopeB - - key: scopeNameAgain - value: - stringValue: scopeB - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeB - version: v0.1.0 - - resource: - attributes: - - key: resourceName - value: - stringValue: resourceB - - key: resourceNameAgain - value: - stringValue: resourceB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scopeLogs: - - attributes: - - key: scopeName - value: - stringValue: scopeA - - key: scopeNameAgain - value: - stringValue: scopeA - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeA - version: v0.1.0 - - attributes: - - key: scopeName - value: - stringValue: scopeB - - key: scopeNameAgain - value: - stringValue: scopeB - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeB - version: v0.1.0 diff --git a/connector/routingconnector/testdata/logs/resource_context/all_match_last_only/config.yaml b/connector/routingconnector/testdata/logs/resource_context/all_match_last_only/config.yaml deleted file mode 100644 index 107c8c59b83b..000000000000 --- a/connector/routingconnector/testdata/logs/resource_context/all_match_last_only/config.yaml +++ /dev/null @@ -1,10 +0,0 @@ -routing: - default_pipelines: - - logs/default - table: - - condition: attributes["resourceName"] == "resourceX" - pipelines: - - logs/0 - - condition: attributes["resourceName"] != nil - pipelines: - - logs/1 diff --git a/connector/routingconnector/testdata/logs/resource_context/all_match_last_only/sink_1.yaml b/connector/routingconnector/testdata/logs/resource_context/all_match_last_only/sink_1.yaml deleted file mode 100644 index 63c6eada6cf9..000000000000 --- a/connector/routingconnector/testdata/logs/resource_context/all_match_last_only/sink_1.yaml +++ /dev/null @@ -1,141 +0,0 @@ -resourceLogs: - - resource: - attributes: - - key: resourceName - value: - stringValue: resourceA - - key: resourceNameAgain - value: - stringValue: resourceA - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scopeLogs: - - attributes: - - key: scopeName - value: - stringValue: scopeA - - key: scopeNameAgain - value: - stringValue: scopeA - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeA - version: v0.1.0 - - attributes: - - key: scopeName - value: - stringValue: scopeB - - key: scopeNameAgain - value: - stringValue: scopeB - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeB - version: v0.1.0 - - resource: - attributes: - - key: resourceName - value: - stringValue: resourceB - - key: resourceNameAgain - value: - stringValue: resourceB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scopeLogs: - - attributes: - - key: scopeName - value: - stringValue: scopeA - - key: scopeNameAgain - value: - stringValue: scopeA - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeA - version: v0.1.0 - - attributes: - - key: scopeName - value: - stringValue: scopeB - - key: scopeNameAgain - value: - stringValue: scopeB - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeB - version: v0.1.0 diff --git a/connector/routingconnector/testdata/logs/resource_context/all_match_once/config.yaml b/connector/routingconnector/testdata/logs/resource_context/all_match_once/config.yaml deleted file mode 100644 index 3edeec5ce55f..000000000000 --- a/connector/routingconnector/testdata/logs/resource_context/all_match_once/config.yaml +++ /dev/null @@ -1,11 +0,0 @@ -routing: - match_once: true - default_pipelines: - - logs/default - table: - - condition: attributes["resourceName"] != nil - pipelines: - - logs/0 - - condition: attributes["resourceName"] == "resourceA" or attributes["resourceName"] == "resourceB" - pipelines: - - logs/1 diff --git a/connector/routingconnector/testdata/logs/resource_context/all_match_once/sink_0.yaml b/connector/routingconnector/testdata/logs/resource_context/all_match_once/sink_0.yaml deleted file mode 100644 index 63c6eada6cf9..000000000000 --- a/connector/routingconnector/testdata/logs/resource_context/all_match_once/sink_0.yaml +++ /dev/null @@ -1,141 +0,0 @@ -resourceLogs: - - resource: - attributes: - - key: resourceName - value: - stringValue: resourceA - - key: resourceNameAgain - value: - stringValue: resourceA - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scopeLogs: - - attributes: - - key: scopeName - value: - stringValue: scopeA - - key: scopeNameAgain - value: - stringValue: scopeA - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeA - version: v0.1.0 - - attributes: - - key: scopeName - value: - stringValue: scopeB - - key: scopeNameAgain - value: - stringValue: scopeB - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeB - version: v0.1.0 - - resource: - attributes: - - key: resourceName - value: - stringValue: resourceB - - key: resourceNameAgain - value: - stringValue: resourceB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scopeLogs: - - attributes: - - key: scopeName - value: - stringValue: scopeA - - key: scopeNameAgain - value: - stringValue: scopeA - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeA - version: v0.1.0 - - attributes: - - key: scopeName - value: - stringValue: scopeB - - key: scopeNameAgain - value: - stringValue: scopeB - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeB - version: v0.1.0 diff --git a/connector/routingconnector/testdata/logs/resource_context/each_matches_one/config.yaml b/connector/routingconnector/testdata/logs/resource_context/each_matches_one/config.yaml deleted file mode 100644 index 98382e3a56a9..000000000000 --- a/connector/routingconnector/testdata/logs/resource_context/each_matches_one/config.yaml +++ /dev/null @@ -1,10 +0,0 @@ -routing: - default_pipelines: - - logs/default - table: - - condition: attributes["resourceName"] == "resourceB" - pipelines: - - logs/0 - - condition: attributes["resourceName"] == "resourceA" - pipelines: - - logs/1 diff --git a/connector/routingconnector/testdata/logs/resource_context/each_matches_one/sink_0.yaml b/connector/routingconnector/testdata/logs/resource_context/each_matches_one/sink_0.yaml deleted file mode 100644 index 28a5a7c8b0f5..000000000000 --- a/connector/routingconnector/testdata/logs/resource_context/each_matches_one/sink_0.yaml +++ /dev/null @@ -1,71 +0,0 @@ -resourceLogs: - - resource: - attributes: - - key: resourceName - value: - stringValue: resourceB - - key: resourceNameAgain - value: - stringValue: resourceB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scopeLogs: - - attributes: - - key: scopeName - value: - stringValue: scopeA - - key: scopeNameAgain - value: - stringValue: scopeA - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeA - version: v0.1.0 - - attributes: - - key: scopeName - value: - stringValue: scopeB - - key: scopeNameAgain - value: - stringValue: scopeB - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeB - version: v0.1.0 diff --git a/connector/routingconnector/testdata/logs/resource_context/each_matches_one/sink_1.yaml b/connector/routingconnector/testdata/logs/resource_context/each_matches_one/sink_1.yaml deleted file mode 100644 index ba494d3e311d..000000000000 --- a/connector/routingconnector/testdata/logs/resource_context/each_matches_one/sink_1.yaml +++ /dev/null @@ -1,71 +0,0 @@ -resourceLogs: - - resource: - attributes: - - key: resourceName - value: - stringValue: resourceA - - key: resourceNameAgain - value: - stringValue: resourceA - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scopeLogs: - - attributes: - - key: scopeName - value: - stringValue: scopeA - - key: scopeNameAgain - value: - stringValue: scopeA - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeA - version: v0.1.0 - - attributes: - - key: scopeName - value: - stringValue: scopeB - - key: scopeNameAgain - value: - stringValue: scopeB - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeB - version: v0.1.0 \ No newline at end of file diff --git a/connector/routingconnector/testdata/logs/resource_context/match_none_with_default/config.yaml b/connector/routingconnector/testdata/logs/resource_context/match_none_with_default/config.yaml deleted file mode 100644 index 5988ac82a9ad..000000000000 --- a/connector/routingconnector/testdata/logs/resource_context/match_none_with_default/config.yaml +++ /dev/null @@ -1,10 +0,0 @@ -routing: - default_pipelines: - - logs/default - table: - - condition: attributes["resourceName"] == "resourceX" - pipelines: - - logs/0 - - condition: attributes["resourceName"] == "resourceY" - pipelines: - - logs/1 diff --git a/connector/routingconnector/testdata/logs/resource_context/match_none_with_default/sink_default.yaml b/connector/routingconnector/testdata/logs/resource_context/match_none_with_default/sink_default.yaml deleted file mode 100644 index 63c6eada6cf9..000000000000 --- a/connector/routingconnector/testdata/logs/resource_context/match_none_with_default/sink_default.yaml +++ /dev/null @@ -1,141 +0,0 @@ -resourceLogs: - - resource: - attributes: - - key: resourceName - value: - stringValue: resourceA - - key: resourceNameAgain - value: - stringValue: resourceA - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scopeLogs: - - attributes: - - key: scopeName - value: - stringValue: scopeA - - key: scopeNameAgain - value: - stringValue: scopeA - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeA - version: v0.1.0 - - attributes: - - key: scopeName - value: - stringValue: scopeB - - key: scopeNameAgain - value: - stringValue: scopeB - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeB - version: v0.1.0 - - resource: - attributes: - - key: resourceName - value: - stringValue: resourceB - - key: resourceNameAgain - value: - stringValue: resourceB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scopeLogs: - - attributes: - - key: scopeName - value: - stringValue: scopeA - - key: scopeNameAgain - value: - stringValue: scopeA - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeA - version: v0.1.0 - - attributes: - - key: scopeName - value: - stringValue: scopeB - - key: scopeNameAgain - value: - stringValue: scopeB - logRecords: - - attributes: - - key: logName - value: - stringValue: logA - - key: logNameAgain - value: - stringValue: logA - body: - stringValue: logA - - attributes: - - key: logName - value: - stringValue: logB - - key: logNameAgain - value: - stringValue: logB - body: - stringValue: logB - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scope: - name: scopeB - version: v0.1.0 diff --git a/connector/routingconnector/testdata/logs/resource_context/match_none_without_default/config.yaml b/connector/routingconnector/testdata/logs/resource_context/match_none_without_default/config.yaml deleted file mode 100644 index 36054006adea..000000000000 --- a/connector/routingconnector/testdata/logs/resource_context/match_none_without_default/config.yaml +++ /dev/null @@ -1,10 +0,0 @@ -routing: - match_once: true - # no default pipelines - table: - - condition: attributes["resourceName"] == "resourceX" - pipelines: - - logs/0 - - condition: attributes["resourceName"] == "resourceY" - pipelines: - - logs/1 diff --git a/connector/routingconnector/traces_test.go b/connector/routingconnector/traces_test.go index d479334e70a8..efa5482a9eea 100644 --- a/connector/routingconnector/traces_test.go +++ b/connector/routingconnector/traces_test.go @@ -483,17 +483,10 @@ func TestTracesConnectorDetailed(t *testing.T) { t.Fatalf("Error reading sink_default.yaml: %v", readErr) } - ctx := context.Background() - if ctxFromFile, readErr := createContextFromFile(t, filepath.Join(tt, "request.yaml")); readErr == nil { - ctx = ctxFromFile - } else if !os.IsNotExist(readErr) { - t.Fatalf("Error reading request.yaml: %v", readErr) - } - input, readErr := golden.ReadTraces(filepath.Join(tt, "input.yaml")) require.NoError(t, readErr) - require.NoError(t, conn.ConsumeTraces(ctx, input)) + require.NoError(t, conn.ConsumeTraces(context.Background(), input)) if expected0 == nil { assert.Empty(t, sink0.AllTraces(), "sink0 should be empty")