diff --git a/connector/routingconnector/internal/plogutil/logs_test.go b/connector/routingconnector/internal/plogutil/logs_test.go index d2cce5f72bd1..5f0a4b00975a 100644 --- a/connector/routingconnector/internal/plogutil/logs_test.go +++ b/connector/routingconnector/internal/plogutil/logs_test.go @@ -4,158 +4,204 @@ package plogutil_test import ( - "path/filepath" "testing" "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/pdata/plog" "github.com/open-telemetry/opentelemetry-collector-contrib/connector/routingconnector/internal/plogutil" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden" + "github.com/open-telemetry/opentelemetry-collector-contrib/connector/routingconnector/internal/plogutiltest" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest/plogtest" ) func TestMoveResourcesIf(t *testing.T) { testCases := []struct { - name string - condition func(plog.ResourceLogs) bool + name string + moveIf func(plog.ResourceLogs) bool + from plog.Logs + to plog.Logs + expectFrom plog.Logs + expectTo plog.Logs }{ { name: "move_none", - condition: func(plog.ResourceLogs) bool { + moveIf: func(plog.ResourceLogs) bool { return false }, + from: plogutiltest.NewLogs("AB", "CD", "EF"), + to: plog.NewLogs(), + expectFrom: plogutiltest.NewLogs("AB", "CD", "EF"), + expectTo: plog.NewLogs(), }, { name: "move_all", - condition: func(plog.ResourceLogs) bool { + moveIf: func(plog.ResourceLogs) bool { return true }, + from: plogutiltest.NewLogs("AB", "CD", "EF"), + to: plog.NewLogs(), + expectFrom: plog.NewLogs(), + expectTo: plogutiltest.NewLogs("AB", "CD", "EF"), }, { name: "move_one", - condition: func(rl plog.ResourceLogs) bool { + moveIf: func(rl plog.ResourceLogs) bool { rname, ok := rl.Resource().Attributes().Get("resourceName") return ok && rname.AsString() == "resourceA" }, + from: plogutiltest.NewLogs("AB", "CD", "EF"), + to: plog.NewLogs(), + expectFrom: plogutiltest.NewLogs("B", "CD", "EF"), + expectTo: plogutiltest.NewLogs("A", "CD", "EF"), }, { name: "move_to_preexisting", - condition: func(rl plog.ResourceLogs) bool { + moveIf: func(rl plog.ResourceLogs) bool { rname, ok := rl.Resource().Attributes().Get("resourceName") return ok && rname.AsString() == "resourceB" }, + from: plogutiltest.NewLogs("AB", "CD", "EF"), + to: plogutiltest.NewLogs("1", "2", "3"), + expectFrom: plogutiltest.NewLogs("A", "CD", "EF"), + expectTo: plogutiltest.NewLogsFromOpts( + plogutiltest.WithResource('1', plogutiltest.WithScope('2', "3")), + plogutiltest.WithResource('B', plogutiltest.WithScope('C', "EF"), plogutiltest.WithScope('D', "EF")), + ), }, } for _, tt := range testCases { t.Run(tt.name, func(t *testing.T) { - // Load up a fresh copy of the input for each test, since it may be modified in place. - from, err := golden.ReadLogs(filepath.Join("testdata", "resource", tt.name, "from.yaml")) - require.NoError(t, err) - - to, err := golden.ReadLogs(filepath.Join("testdata", "resource", tt.name, "to.yaml")) - require.NoError(t, err) - - fromModifed, err := golden.ReadLogs(filepath.Join("testdata", "resource", tt.name, "from_modified.yaml")) - require.NoError(t, err) - - toModified, err := golden.ReadLogs(filepath.Join("testdata", "resource", tt.name, "to_modified.yaml")) - require.NoError(t, err) - - plogutil.MoveResourcesIf(from, to, tt.condition) - - assert.NoError(t, plogtest.CompareLogs(fromModifed, from), "from not modified as expected") - assert.NoError(t, plogtest.CompareLogs(toModified, to), "to not as expected") + plogutil.MoveResourcesIf(tt.from, tt.to, tt.moveIf) + assert.NoError(t, plogtest.CompareLogs(tt.expectFrom, tt.from), "from not modified as expected") + assert.NoError(t, plogtest.CompareLogs(tt.expectTo, tt.to), "to not as expected") }) } } func TestMoveRecordsWithContextIf(t *testing.T) { testCases := []struct { - name string - condition func(plog.ResourceLogs, plog.ScopeLogs, plog.LogRecord) bool + name string + moveIf func(plog.ResourceLogs, plog.ScopeLogs, plog.LogRecord) bool + from plog.Logs + to plog.Logs + expectFrom plog.Logs + expectTo plog.Logs }{ { name: "move_none", - condition: func(plog.ResourceLogs, plog.ScopeLogs, plog.LogRecord) bool { + moveIf: func(plog.ResourceLogs, plog.ScopeLogs, plog.LogRecord) bool { return false }, + from: plogutiltest.NewLogs("AB", "CD", "EF"), + to: plog.NewLogs(), + expectFrom: plogutiltest.NewLogs("AB", "CD", "EF"), + expectTo: plog.NewLogs(), }, { name: "move_all", - condition: func(plog.ResourceLogs, plog.ScopeLogs, plog.LogRecord) bool { + moveIf: func(plog.ResourceLogs, plog.ScopeLogs, plog.LogRecord) bool { return true }, + from: plogutiltest.NewLogs("AB", "CD", "EF"), + to: plog.NewLogs(), + expectFrom: plog.NewLogs(), + expectTo: plogutiltest.NewLogs("AB", "CD", "EF"), }, { name: "move_all_from_one_resource", - condition: func(rl plog.ResourceLogs, _ plog.ScopeLogs, _ plog.LogRecord) bool { + moveIf: func(rl plog.ResourceLogs, _ plog.ScopeLogs, _ plog.LogRecord) bool { rname, ok := rl.Resource().Attributes().Get("resourceName") return ok && rname.AsString() == "resourceB" }, + from: plogutiltest.NewLogs("AB", "CD", "EF"), + to: plog.NewLogs(), + expectFrom: plogutiltest.NewLogs("A", "CD", "EF"), + expectTo: plogutiltest.NewLogs("B", "CD", "EF"), }, { name: "move_all_from_one_scope", - condition: func(rl plog.ResourceLogs, sl plog.ScopeLogs, _ plog.LogRecord) bool { + moveIf: func(rl plog.ResourceLogs, sl plog.ScopeLogs, _ plog.LogRecord) bool { rname, ok := rl.Resource().Attributes().Get("resourceName") - return ok && rname.AsString() == "resourceB" && sl.Scope().Name() == "scopeA" + return ok && rname.AsString() == "resourceB" && sl.Scope().Name() == "scopeC" }, + from: plogutiltest.NewLogs("AB", "CD", "EF"), + to: plog.NewLogs(), + expectFrom: plogutiltest.NewLogsFromOpts( + plogutiltest.WithResource('A', plogutiltest.WithScope('C', "EF"), plogutiltest.WithScope('D', "EF")), + plogutiltest.WithResource('B', plogutiltest.WithScope('D', "EF")), + ), + expectTo: plogutiltest.NewLogs("B", "C", "EF"), }, { name: "move_all_from_one_scope_in_each_resource", - condition: func(_ plog.ResourceLogs, sl plog.ScopeLogs, _ plog.LogRecord) bool { - return sl.Scope().Name() == "scopeB" + moveIf: func(_ plog.ResourceLogs, sl plog.ScopeLogs, _ plog.LogRecord) bool { + return sl.Scope().Name() == "scopeD" }, + from: plogutiltest.NewLogs("AB", "CD", "EF"), + to: plog.NewLogs(), + expectFrom: plogutiltest.NewLogs("AB", "C", "EF"), + expectTo: plogutiltest.NewLogs("AB", "D", "EF"), }, { name: "move_one", - condition: func(rl plog.ResourceLogs, sl plog.ScopeLogs, lr plog.LogRecord) bool { + moveIf: func(rl plog.ResourceLogs, sl plog.ScopeLogs, lr plog.LogRecord) bool { rname, ok := rl.Resource().Attributes().Get("resourceName") - return ok && rname.AsString() == "resourceA" && sl.Scope().Name() == "scopeB" && lr.Body().AsString() == "logB" + return ok && rname.AsString() == "resourceA" && sl.Scope().Name() == "scopeD" && lr.Body().AsString() == "logF" }, + from: plogutiltest.NewLogs("AB", "CD", "EF"), + to: plog.NewLogs(), + expectFrom: plogutiltest.NewLogsFromOpts( + plogutiltest.WithResource('A', plogutiltest.WithScope('C', "EF"), plogutiltest.WithScope('D', "E")), + plogutiltest.WithResource('B', plogutiltest.WithScope('C', "EF"), plogutiltest.WithScope('D', "EF")), + ), + expectTo: plogutiltest.NewLogs("A", "D", "F"), }, { name: "move_one_from_each_scope", - condition: func(_ plog.ResourceLogs, _ plog.ScopeLogs, lr plog.LogRecord) bool { - return lr.Body().AsString() == "logA" + moveIf: func(_ plog.ResourceLogs, _ plog.ScopeLogs, lr plog.LogRecord) bool { + return lr.Body().AsString() == "logE" }, + from: plogutiltest.NewLogs("AB", "CD", "EF"), + to: plog.NewLogs(), + expectFrom: plogutiltest.NewLogs("AB", "CD", "F"), + expectTo: plogutiltest.NewLogs("AB", "CD", "E"), }, { name: "move_one_from_each_scope_in_one_resource", - condition: func(rl plog.ResourceLogs, _ plog.ScopeLogs, lr plog.LogRecord) bool { + moveIf: func(rl plog.ResourceLogs, _ plog.ScopeLogs, lr plog.LogRecord) bool { rname, ok := rl.Resource().Attributes().Get("resourceName") - return ok && rname.AsString() == "resourceB" && lr.Body().AsString() == "logA" + return ok && rname.AsString() == "resourceB" && lr.Body().AsString() == "logE" }, + from: plogutiltest.NewLogs("AB", "CD", "EF"), + to: plog.NewLogs(), + expectFrom: plogutiltest.NewLogsFromOpts( + plogutiltest.WithResource('A', plogutiltest.WithScope('C', "EF"), plogutiltest.WithScope('D', "EF")), + plogutiltest.WithResource('B', plogutiltest.WithScope('C', "F"), plogutiltest.WithScope('D', "F")), + ), + expectTo: plogutiltest.NewLogs("B", "CD", "E"), }, { name: "move_some_to_preexisting", - condition: func(_ plog.ResourceLogs, sl plog.ScopeLogs, _ plog.LogRecord) bool { - return sl.Scope().Name() == "scopeB" + moveIf: func(_ plog.ResourceLogs, sl plog.ScopeLogs, _ plog.LogRecord) bool { + return sl.Scope().Name() == "scopeD" }, + from: plogutiltest.NewLogs("AB", "CD", "EF"), + to: plogutiltest.NewLogs("1", "2", "3"), + expectFrom: plogutiltest.NewLogs("AB", "C", "EF"), + expectTo: plogutiltest.NewLogsFromOpts( + plogutiltest.WithResource('1', plogutiltest.WithScope('2', "3")), + plogutiltest.WithResource('A', plogutiltest.WithScope('D', "EF")), + plogutiltest.WithResource('B', plogutiltest.WithScope('D', "EF")), + ), }, } for _, tt := range testCases { t.Run(tt.name, func(t *testing.T) { - // Load up a fresh copy of the input for each test, since it may be modified in place. - from, err := golden.ReadLogs(filepath.Join("testdata", "record", tt.name, "from.yaml")) - require.NoError(t, err) - - to, err := golden.ReadLogs(filepath.Join("testdata", "record", tt.name, "to.yaml")) - require.NoError(t, err) - - fromModifed, err := golden.ReadLogs(filepath.Join("testdata", "record", tt.name, "from_modified.yaml")) - require.NoError(t, err) - - toModified, err := golden.ReadLogs(filepath.Join("testdata", "record", tt.name, "to_modified.yaml")) - require.NoError(t, err) - - plogutil.MoveRecordsWithContextIf(from, to, tt.condition) - - assert.NoError(t, plogtest.CompareLogs(fromModifed, from), "from not modified as expected") - assert.NoError(t, plogtest.CompareLogs(toModified, to), "to not as expected") + plogutil.MoveRecordsWithContextIf(tt.from, tt.to, tt.moveIf) + assert.NoError(t, plogtest.CompareLogs(tt.expectFrom, tt.from), "from not modified as expected") + assert.NoError(t, plogtest.CompareLogs(tt.expectTo, tt.to), "to not as expected") }) } } diff --git a/connector/routingconnector/internal/plogutil/testdata/record/move_all/from.yaml b/connector/routingconnector/internal/plogutil/testdata/record/move_all/from.yaml deleted file mode 100644 index 63c6eada6cf9..000000000000 --- a/connector/routingconnector/internal/plogutil/testdata/record/move_all/from.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/internal/plogutil/testdata/record/move_all/from_modified.yaml b/connector/routingconnector/internal/plogutil/testdata/record/move_all/from_modified.yaml deleted file mode 100644 index 8b137891791f..000000000000 --- a/connector/routingconnector/internal/plogutil/testdata/record/move_all/from_modified.yaml +++ /dev/null @@ -1 +0,0 @@ - diff --git a/connector/routingconnector/internal/plogutil/testdata/record/move_all/to.yaml b/connector/routingconnector/internal/plogutil/testdata/record/move_all/to.yaml deleted file mode 100644 index 8b137891791f..000000000000 --- a/connector/routingconnector/internal/plogutil/testdata/record/move_all/to.yaml +++ /dev/null @@ -1 +0,0 @@ - diff --git a/connector/routingconnector/internal/plogutil/testdata/record/move_all/to_modified.yaml b/connector/routingconnector/internal/plogutil/testdata/record/move_all/to_modified.yaml deleted file mode 100644 index 63c6eada6cf9..000000000000 --- a/connector/routingconnector/internal/plogutil/testdata/record/move_all/to_modified.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/internal/plogutil/testdata/record/move_all_from_one_resource/from.yaml b/connector/routingconnector/internal/plogutil/testdata/record/move_all_from_one_resource/from.yaml deleted file mode 100644 index 63c6eada6cf9..000000000000 --- a/connector/routingconnector/internal/plogutil/testdata/record/move_all_from_one_resource/from.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/internal/plogutil/testdata/record/move_all_from_one_resource/from_modified.yaml b/connector/routingconnector/internal/plogutil/testdata/record/move_all_from_one_resource/from_modified.yaml deleted file mode 100644 index 72f617672bf3..000000000000 --- a/connector/routingconnector/internal/plogutil/testdata/record/move_all_from_one_resource/from_modified.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/internal/plogutil/testdata/record/move_all_from_one_resource/to.yaml b/connector/routingconnector/internal/plogutil/testdata/record/move_all_from_one_resource/to.yaml deleted file mode 100644 index 8b137891791f..000000000000 --- a/connector/routingconnector/internal/plogutil/testdata/record/move_all_from_one_resource/to.yaml +++ /dev/null @@ -1 +0,0 @@ - diff --git a/connector/routingconnector/internal/plogutil/testdata/record/move_all_from_one_resource/to_modified.yaml b/connector/routingconnector/internal/plogutil/testdata/record/move_all_from_one_resource/to_modified.yaml deleted file mode 100644 index 28a5a7c8b0f5..000000000000 --- a/connector/routingconnector/internal/plogutil/testdata/record/move_all_from_one_resource/to_modified.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/internal/plogutil/testdata/record/move_all_from_one_scope/from.yaml b/connector/routingconnector/internal/plogutil/testdata/record/move_all_from_one_scope/from.yaml deleted file mode 100644 index 63c6eada6cf9..000000000000 --- a/connector/routingconnector/internal/plogutil/testdata/record/move_all_from_one_scope/from.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/internal/plogutil/testdata/record/move_all_from_one_scope/from_modified.yaml b/connector/routingconnector/internal/plogutil/testdata/record/move_all_from_one_scope/from_modified.yaml deleted file mode 100644 index 28fed8ee680e..000000000000 --- a/connector/routingconnector/internal/plogutil/testdata/record/move_all_from_one_scope/from_modified.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/internal/plogutil/testdata/record/move_all_from_one_scope/to.yaml b/connector/routingconnector/internal/plogutil/testdata/record/move_all_from_one_scope/to.yaml deleted file mode 100644 index 8b137891791f..000000000000 --- a/connector/routingconnector/internal/plogutil/testdata/record/move_all_from_one_scope/to.yaml +++ /dev/null @@ -1 +0,0 @@ - diff --git a/connector/routingconnector/internal/plogutil/testdata/record/move_all_from_one_scope/to_modified.yaml b/connector/routingconnector/internal/plogutil/testdata/record/move_all_from_one_scope/to_modified.yaml deleted file mode 100644 index d42bbbcd478c..000000000000 --- a/connector/routingconnector/internal/plogutil/testdata/record/move_all_from_one_scope/to_modified.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/internal/plogutil/testdata/record/move_all_from_one_scope_in_each_resource/from.yaml b/connector/routingconnector/internal/plogutil/testdata/record/move_all_from_one_scope_in_each_resource/from.yaml deleted file mode 100644 index 63c6eada6cf9..000000000000 --- a/connector/routingconnector/internal/plogutil/testdata/record/move_all_from_one_scope_in_each_resource/from.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/internal/plogutil/testdata/record/move_all_from_one_scope_in_each_resource/from_modified.yaml b/connector/routingconnector/internal/plogutil/testdata/record/move_all_from_one_scope_in_each_resource/from_modified.yaml deleted file mode 100644 index 71ca02311582..000000000000 --- a/connector/routingconnector/internal/plogutil/testdata/record/move_all_from_one_scope_in_each_resource/from_modified.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/internal/plogutil/testdata/record/move_all_from_one_scope_in_each_resource/to.yaml b/connector/routingconnector/internal/plogutil/testdata/record/move_all_from_one_scope_in_each_resource/to.yaml deleted file mode 100644 index 8b137891791f..000000000000 --- a/connector/routingconnector/internal/plogutil/testdata/record/move_all_from_one_scope_in_each_resource/to.yaml +++ /dev/null @@ -1 +0,0 @@ - diff --git a/connector/routingconnector/internal/plogutil/testdata/record/move_all_from_one_scope_in_each_resource/to_modified.yaml b/connector/routingconnector/internal/plogutil/testdata/record/move_all_from_one_scope_in_each_resource/to_modified.yaml deleted file mode 100644 index 8c8745158e33..000000000000 --- a/connector/routingconnector/internal/plogutil/testdata/record/move_all_from_one_scope_in_each_resource/to_modified.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/internal/plogutil/testdata/record/move_none/from.yaml b/connector/routingconnector/internal/plogutil/testdata/record/move_none/from.yaml deleted file mode 100644 index 63c6eada6cf9..000000000000 --- a/connector/routingconnector/internal/plogutil/testdata/record/move_none/from.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/internal/plogutil/testdata/record/move_none/from_modified.yaml b/connector/routingconnector/internal/plogutil/testdata/record/move_none/from_modified.yaml deleted file mode 100644 index 63c6eada6cf9..000000000000 --- a/connector/routingconnector/internal/plogutil/testdata/record/move_none/from_modified.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/internal/plogutil/testdata/record/move_none/to.yaml b/connector/routingconnector/internal/plogutil/testdata/record/move_none/to.yaml deleted file mode 100644 index 8b137891791f..000000000000 --- a/connector/routingconnector/internal/plogutil/testdata/record/move_none/to.yaml +++ /dev/null @@ -1 +0,0 @@ - diff --git a/connector/routingconnector/internal/plogutil/testdata/record/move_none/to_modified.yaml b/connector/routingconnector/internal/plogutil/testdata/record/move_none/to_modified.yaml deleted file mode 100644 index 8b137891791f..000000000000 --- a/connector/routingconnector/internal/plogutil/testdata/record/move_none/to_modified.yaml +++ /dev/null @@ -1 +0,0 @@ - diff --git a/connector/routingconnector/internal/plogutil/testdata/record/move_one/from.yaml b/connector/routingconnector/internal/plogutil/testdata/record/move_one/from.yaml deleted file mode 100644 index 63c6eada6cf9..000000000000 --- a/connector/routingconnector/internal/plogutil/testdata/record/move_one/from.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/internal/plogutil/testdata/record/move_one/from_modified.yaml b/connector/routingconnector/internal/plogutil/testdata/record/move_one/from_modified.yaml deleted file mode 100644 index 293ef60f94c0..000000000000 --- a/connector/routingconnector/internal/plogutil/testdata/record/move_one/from_modified.yaml +++ /dev/null @@ -1,132 +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 - 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/internal/plogutil/testdata/record/move_one/to.yaml b/connector/routingconnector/internal/plogutil/testdata/record/move_one/to.yaml deleted file mode 100644 index 8b137891791f..000000000000 --- a/connector/routingconnector/internal/plogutil/testdata/record/move_one/to.yaml +++ /dev/null @@ -1 +0,0 @@ - diff --git a/connector/routingconnector/internal/plogutil/testdata/record/move_one/to_modified.yaml b/connector/routingconnector/internal/plogutil/testdata/record/move_one/to_modified.yaml deleted file mode 100644 index 5bc00c939ba1..000000000000 --- a/connector/routingconnector/internal/plogutil/testdata/record/move_one/to_modified.yaml +++ /dev/null @@ -1,32 +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: 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/internal/plogutil/testdata/record/move_one_from_each_scope/from.yaml b/connector/routingconnector/internal/plogutil/testdata/record/move_one_from_each_scope/from.yaml deleted file mode 100644 index 63c6eada6cf9..000000000000 --- a/connector/routingconnector/internal/plogutil/testdata/record/move_one_from_each_scope/from.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/internal/plogutil/testdata/record/move_one_from_each_scope/from_modified.yaml b/connector/routingconnector/internal/plogutil/testdata/record/move_one_from_each_scope/from_modified.yaml deleted file mode 100644 index c6c0fa65fcc0..000000000000 --- a/connector/routingconnector/internal/plogutil/testdata/record/move_one_from_each_scope/from_modified.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/internal/plogutil/testdata/record/move_one_from_each_scope/to.yaml b/connector/routingconnector/internal/plogutil/testdata/record/move_one_from_each_scope/to.yaml deleted file mode 100644 index 8b137891791f..000000000000 --- a/connector/routingconnector/internal/plogutil/testdata/record/move_one_from_each_scope/to.yaml +++ /dev/null @@ -1 +0,0 @@ - diff --git a/connector/routingconnector/internal/plogutil/testdata/record/move_one_from_each_scope/to_modified.yaml b/connector/routingconnector/internal/plogutil/testdata/record/move_one_from_each_scope/to_modified.yaml deleted file mode 100644 index 39604c6017d6..000000000000 --- a/connector/routingconnector/internal/plogutil/testdata/record/move_one_from_each_scope/to_modified.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/internal/plogutil/testdata/record/move_one_from_each_scope_in_one_resource/from.yaml b/connector/routingconnector/internal/plogutil/testdata/record/move_one_from_each_scope_in_one_resource/from.yaml deleted file mode 100644 index 63c6eada6cf9..000000000000 --- a/connector/routingconnector/internal/plogutil/testdata/record/move_one_from_each_scope_in_one_resource/from.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/internal/plogutil/testdata/record/move_one_from_each_scope_in_one_resource/from_modified.yaml b/connector/routingconnector/internal/plogutil/testdata/record/move_one_from_each_scope_in_one_resource/from_modified.yaml deleted file mode 100644 index 99ee9a0c24ea..000000000000 --- a/connector/routingconnector/internal/plogutil/testdata/record/move_one_from_each_scope_in_one_resource/from_modified.yaml +++ /dev/null @@ -1,123 +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: 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/internal/plogutil/testdata/record/move_one_from_each_scope_in_one_resource/to.yaml b/connector/routingconnector/internal/plogutil/testdata/record/move_one_from_each_scope_in_one_resource/to.yaml deleted file mode 100644 index 8b137891791f..000000000000 --- a/connector/routingconnector/internal/plogutil/testdata/record/move_one_from_each_scope_in_one_resource/to.yaml +++ /dev/null @@ -1 +0,0 @@ - diff --git a/connector/routingconnector/internal/plogutil/testdata/record/move_one_from_each_scope_in_one_resource/to_modified.yaml b/connector/routingconnector/internal/plogutil/testdata/record/move_one_from_each_scope_in_one_resource/to_modified.yaml deleted file mode 100644 index a2e7ef72f97e..000000000000 --- a/connector/routingconnector/internal/plogutil/testdata/record/move_one_from_each_scope_in_one_resource/to_modified.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/internal/plogutil/testdata/record/move_some_to_preexisting/from.yaml b/connector/routingconnector/internal/plogutil/testdata/record/move_some_to_preexisting/from.yaml deleted file mode 100644 index 63c6eada6cf9..000000000000 --- a/connector/routingconnector/internal/plogutil/testdata/record/move_some_to_preexisting/from.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/internal/plogutil/testdata/record/move_some_to_preexisting/from_modified.yaml b/connector/routingconnector/internal/plogutil/testdata/record/move_some_to_preexisting/from_modified.yaml deleted file mode 100644 index 71ca02311582..000000000000 --- a/connector/routingconnector/internal/plogutil/testdata/record/move_some_to_preexisting/from_modified.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/internal/plogutil/testdata/record/move_some_to_preexisting/to.yaml b/connector/routingconnector/internal/plogutil/testdata/record/move_some_to_preexisting/to.yaml deleted file mode 100644 index d1f37edae9cd..000000000000 --- a/connector/routingconnector/internal/plogutil/testdata/record/move_some_to_preexisting/to.yaml +++ /dev/null @@ -1,71 +0,0 @@ -resourceLogs: - - resource: - attributes: - - key: resourceName - value: - stringValue: resourceC - - key: resourceNameAgain - value: - stringValue: resourceC - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scopeLogs: - - attributes: - - key: scopeName - value: - stringValue: scopeA - - 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: 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/internal/plogutil/testdata/record/move_some_to_preexisting/to_modified.yaml b/connector/routingconnector/internal/plogutil/testdata/record/move_some_to_preexisting/to_modified.yaml deleted file mode 100644 index df27dd6cce1b..000000000000 --- a/connector/routingconnector/internal/plogutil/testdata/record/move_some_to_preexisting/to_modified.yaml +++ /dev/null @@ -1,152 +0,0 @@ -resourceLogs: - - resource: - attributes: - - key: resourceName - value: - stringValue: resourceC - - key: resourceNameAgain - value: - stringValue: resourceC - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scopeLogs: - - attributes: - - key: scopeName - value: - stringValue: scopeA - - 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: 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: 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/internal/plogutil/testdata/resource/move_all/from.yaml b/connector/routingconnector/internal/plogutil/testdata/resource/move_all/from.yaml deleted file mode 100644 index 63c6eada6cf9..000000000000 --- a/connector/routingconnector/internal/plogutil/testdata/resource/move_all/from.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/internal/plogutil/testdata/resource/move_all/from_modified.yaml b/connector/routingconnector/internal/plogutil/testdata/resource/move_all/from_modified.yaml deleted file mode 100644 index 8b137891791f..000000000000 --- a/connector/routingconnector/internal/plogutil/testdata/resource/move_all/from_modified.yaml +++ /dev/null @@ -1 +0,0 @@ - diff --git a/connector/routingconnector/internal/plogutil/testdata/resource/move_all/to.yaml b/connector/routingconnector/internal/plogutil/testdata/resource/move_all/to.yaml deleted file mode 100644 index 8b137891791f..000000000000 --- a/connector/routingconnector/internal/plogutil/testdata/resource/move_all/to.yaml +++ /dev/null @@ -1 +0,0 @@ - diff --git a/connector/routingconnector/internal/plogutil/testdata/resource/move_all/to_modified.yaml b/connector/routingconnector/internal/plogutil/testdata/resource/move_all/to_modified.yaml deleted file mode 100644 index 63c6eada6cf9..000000000000 --- a/connector/routingconnector/internal/plogutil/testdata/resource/move_all/to_modified.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/internal/plogutil/testdata/resource/move_none/from.yaml b/connector/routingconnector/internal/plogutil/testdata/resource/move_none/from.yaml deleted file mode 100644 index 63c6eada6cf9..000000000000 --- a/connector/routingconnector/internal/plogutil/testdata/resource/move_none/from.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/internal/plogutil/testdata/resource/move_none/from_modified.yaml b/connector/routingconnector/internal/plogutil/testdata/resource/move_none/from_modified.yaml deleted file mode 100644 index 63c6eada6cf9..000000000000 --- a/connector/routingconnector/internal/plogutil/testdata/resource/move_none/from_modified.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/internal/plogutil/testdata/resource/move_none/to.yaml b/connector/routingconnector/internal/plogutil/testdata/resource/move_none/to.yaml deleted file mode 100644 index 8b137891791f..000000000000 --- a/connector/routingconnector/internal/plogutil/testdata/resource/move_none/to.yaml +++ /dev/null @@ -1 +0,0 @@ - diff --git a/connector/routingconnector/internal/plogutil/testdata/resource/move_none/to_modified.yaml b/connector/routingconnector/internal/plogutil/testdata/resource/move_none/to_modified.yaml deleted file mode 100644 index 8b137891791f..000000000000 --- a/connector/routingconnector/internal/plogutil/testdata/resource/move_none/to_modified.yaml +++ /dev/null @@ -1 +0,0 @@ - diff --git a/connector/routingconnector/internal/plogutil/testdata/resource/move_one/from.yaml b/connector/routingconnector/internal/plogutil/testdata/resource/move_one/from.yaml deleted file mode 100644 index 63c6eada6cf9..000000000000 --- a/connector/routingconnector/internal/plogutil/testdata/resource/move_one/from.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/internal/plogutil/testdata/resource/move_one/from_modified.yaml b/connector/routingconnector/internal/plogutil/testdata/resource/move_one/from_modified.yaml deleted file mode 100644 index 28a5a7c8b0f5..000000000000 --- a/connector/routingconnector/internal/plogutil/testdata/resource/move_one/from_modified.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/internal/plogutil/testdata/resource/move_one/to.yaml b/connector/routingconnector/internal/plogutil/testdata/resource/move_one/to.yaml deleted file mode 100644 index 8b137891791f..000000000000 --- a/connector/routingconnector/internal/plogutil/testdata/resource/move_one/to.yaml +++ /dev/null @@ -1 +0,0 @@ - diff --git a/connector/routingconnector/internal/plogutil/testdata/resource/move_one/to_modified.yaml b/connector/routingconnector/internal/plogutil/testdata/resource/move_one/to_modified.yaml deleted file mode 100644 index 72f617672bf3..000000000000 --- a/connector/routingconnector/internal/plogutil/testdata/resource/move_one/to_modified.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/internal/plogutil/testdata/resource/move_to_preexisting/from.yaml b/connector/routingconnector/internal/plogutil/testdata/resource/move_to_preexisting/from.yaml deleted file mode 100644 index 63c6eada6cf9..000000000000 --- a/connector/routingconnector/internal/plogutil/testdata/resource/move_to_preexisting/from.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/internal/plogutil/testdata/resource/move_to_preexisting/from_modified.yaml b/connector/routingconnector/internal/plogutil/testdata/resource/move_to_preexisting/from_modified.yaml deleted file mode 100644 index ef36119ae039..000000000000 --- a/connector/routingconnector/internal/plogutil/testdata/resource/move_to_preexisting/from_modified.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/internal/plogutil/testdata/resource/move_to_preexisting/to.yaml b/connector/routingconnector/internal/plogutil/testdata/resource/move_to_preexisting/to.yaml deleted file mode 100644 index d1f37edae9cd..000000000000 --- a/connector/routingconnector/internal/plogutil/testdata/resource/move_to_preexisting/to.yaml +++ /dev/null @@ -1,71 +0,0 @@ -resourceLogs: - - resource: - attributes: - - key: resourceName - value: - stringValue: resourceC - - key: resourceNameAgain - value: - stringValue: resourceC - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scopeLogs: - - attributes: - - key: scopeName - value: - stringValue: scopeA - - 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: 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/internal/plogutil/testdata/resource/move_to_preexisting/to_modified.yaml b/connector/routingconnector/internal/plogutil/testdata/resource/move_to_preexisting/to_modified.yaml deleted file mode 100644 index a29eeeb8f3c1..000000000000 --- a/connector/routingconnector/internal/plogutil/testdata/resource/move_to_preexisting/to_modified.yaml +++ /dev/null @@ -1,141 +0,0 @@ -resourceLogs: - - resource: - attributes: - - key: resourceName - value: - stringValue: resourceC - - key: resourceNameAgain - value: - stringValue: resourceC - schemaUrl: https://opentelemetry.io/schemas/1.6.1 - scopeLogs: - - attributes: - - key: scopeName - value: - stringValue: scopeA - - 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: 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/internal/plogutiltest/logs.go b/connector/routingconnector/internal/plogutiltest/logs.go new file mode 100644 index 000000000000..c8190bbe2179 --- /dev/null +++ b/connector/routingconnector/internal/plogutiltest/logs.go @@ -0,0 +1,78 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package plogutiltest // import "github.com/open-telemetry/opentelemetry-collector-contrib/connector/routingconnector/internal/plogutiltest" + +import "go.opentelemetry.io/collector/pdata/plog" + +// TestLogs returns a plog.Logs with a uniform structure where resources, scopes, and +// log records are identical across all instances, except for one identifying field. +// +// Identifying fields: +// - Resources have an attribute called "resourceName" with a value of "resourceN". +// - Scopes have a name with a value of "scopeN". +// - LogRecords have a body with a value of "logN". +// +// Example: TestLogs("AB", "XYZ", "1234") returns: +// +// resourceA, resourceB +// each with scopeX, scopeY, scopeZ +// each with log1, log2, log3, log4 +// +// Each byte in the input string is a unique ID for the corresponding element. +func NewLogs(rIDs, sIDs, lIDs string) plog.Logs { + ld := plog.NewLogs() + for ri := 0; ri < len(rIDs); ri++ { + r := ld.ResourceLogs().AppendEmpty() + r.Resource().Attributes().PutStr("resourceName", "resource"+string(rIDs[ri])) + for si := 0; si < len(sIDs); si++ { + s := r.ScopeLogs().AppendEmpty() + s.Scope().SetName("scope" + string(sIDs[si])) + for li := 0; li < len(lIDs); li++ { + m := s.LogRecords().AppendEmpty() + m.Body().SetStr("log" + string(lIDs[li])) + } + } + } + return ld +} + +type Resource struct { + id byte + scopes []Scope +} + +type Scope struct { + id byte + logs string +} + +func WithResource(id byte, scopes ...Scope) Resource { + r := Resource{id: id} + r.scopes = append(r.scopes, scopes...) + return r +} + +func WithScope(id byte, logs string) Scope { + return Scope{id: id, logs: logs} +} + +// NewLogsFromOpts creates a plog.Logs with the specified resources, scopes, and logs. +// The general idea is the same as NewLogs, but this function allows for more flexibility +// in creating non-uniform structures. +func NewLogsFromOpts(resources ...Resource) plog.Logs { + ld := plog.NewLogs() + for _, resource := range resources { + r := ld.ResourceLogs().AppendEmpty() + r.Resource().Attributes().PutStr("resourceName", "resource"+string(resource.id)) + for _, scope := range resource.scopes { + s := r.ScopeLogs().AppendEmpty() + s.Scope().SetName("scope" + string(scope.id)) + for i := 0; i < len(scope.logs); i++ { + l := s.LogRecords().AppendEmpty() + l.Body().SetStr("log" + string(scope.logs[i])) + } + } + } + return ld +} diff --git a/connector/routingconnector/internal/plogutiltest/logs_test.go b/connector/routingconnector/internal/plogutiltest/logs_test.go new file mode 100644 index 000000000000..282aeddba5bd --- /dev/null +++ b/connector/routingconnector/internal/plogutiltest/logs_test.go @@ -0,0 +1,133 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package plogutiltest_test + +import ( + "testing" + + "github.com/stretchr/testify/assert" + "go.opentelemetry.io/collector/pdata/plog" + + "github.com/open-telemetry/opentelemetry-collector-contrib/connector/routingconnector/internal/plogutiltest" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest/plogtest" +) + +func TestNewLogs(t *testing.T) { + + t.Run("empty", func(t *testing.T) { + expected := plog.NewLogs() + assert.NoError(t, plogtest.CompareLogs(expected, plogutiltest.NewLogs("", "", ""))) + assert.NoError(t, plogtest.CompareLogs(expected, plogutiltest.NewLogsFromOpts())) + }) + + t.Run("simple", func(t *testing.T) { + expected := func() plog.Logs { + ld := plog.NewLogs() + r := ld.ResourceLogs().AppendEmpty() + r.Resource().Attributes().PutStr("resourceName", "resourceA") // resourceA + s := r.ScopeLogs().AppendEmpty() + s.Scope().SetName("scopeB") // resourceA.scopeB + l := s.LogRecords().AppendEmpty() + l.Body().SetStr("logC") // resourceA.scopeB.logC + return ld + }() + assert.NoError(t, plogtest.CompareLogs(expected, plogutiltest.NewLogs("A", "B", "C"))) + assert.NoError(t, plogtest.CompareLogs(expected, plogutiltest.NewLogsFromOpts( + plogutiltest.WithResource('A', plogutiltest.WithScope('B', "C")), + ))) + }) + + t.Run("two_resources", func(t *testing.T) { + expected := func() plog.Logs { + ld := plog.NewLogs() + r := ld.ResourceLogs().AppendEmpty() + r.Resource().Attributes().PutStr("resourceName", "resourceA") // resourceA + s := r.ScopeLogs().AppendEmpty() + s.Scope().SetName("scopeC") // resourceA.scopeC + l := s.LogRecords().AppendEmpty() + l.Body().SetStr("logD") // resourceA.scopeC.logD + r = ld.ResourceLogs().AppendEmpty() + r.Resource().Attributes().PutStr("resourceName", "resourceB") // resourceB + s = r.ScopeLogs().AppendEmpty() + s.Scope().SetName("scopeC") // resourceB.scopeC + l = s.LogRecords().AppendEmpty() + l.Body().SetStr("logD") // resourceB.scopeC.logD + return ld + }() + assert.NoError(t, plogtest.CompareLogs(expected, plogutiltest.NewLogs("AB", "C", "D"))) + assert.NoError(t, plogtest.CompareLogs(expected, plogutiltest.NewLogsFromOpts( + plogutiltest.WithResource('A', plogutiltest.WithScope('C', "D")), + plogutiltest.WithResource('B', plogutiltest.WithScope('C', "D")), + ))) + }) + + t.Run("two_scopes", func(t *testing.T) { + expected := func() plog.Logs { + ld := plog.NewLogs() + r := ld.ResourceLogs().AppendEmpty() + r.Resource().Attributes().PutStr("resourceName", "resourceA") // resourceA + s := r.ScopeLogs().AppendEmpty() + s.Scope().SetName("scopeB") // resourceA.scopeB + l := s.LogRecords().AppendEmpty() + l.Body().SetStr("logD") // resourceA.scopeB.logD + s = r.ScopeLogs().AppendEmpty() + s.Scope().SetName("scopeC") // resourceA.scopeC + l = s.LogRecords().AppendEmpty() + l.Body().SetStr("logD") // resourceA.scopeC.logD + return ld + }() + assert.NoError(t, plogtest.CompareLogs(expected, plogutiltest.NewLogs("A", "BC", "D"))) + assert.NoError(t, plogtest.CompareLogs(expected, plogutiltest.NewLogsFromOpts( + plogutiltest.WithResource('A', plogutiltest.WithScope('B', "D"), plogutiltest.WithScope('C', "D")), + ))) + }) + + t.Run("two_records", func(t *testing.T) { + expected := func() plog.Logs { + ld := plog.NewLogs() + r := ld.ResourceLogs().AppendEmpty() + r.Resource().Attributes().PutStr("resourceName", "resourceA") // resourceA + s := r.ScopeLogs().AppendEmpty() + s.Scope().SetName("scopeB") // resourceA.scopeB + l := s.LogRecords().AppendEmpty() + l.Body().SetStr("logC") // resourceA.scopeB.logC + l = s.LogRecords().AppendEmpty() + l.Body().SetStr("logD") // resourceA.scopeB.logD + return ld + }() + assert.NoError(t, plogtest.CompareLogs(expected, plogutiltest.NewLogs("A", "B", "CD"))) + assert.NoError(t, plogtest.CompareLogs(expected, plogutiltest.NewLogsFromOpts( + plogutiltest.WithResource('A', plogutiltest.WithScope('B', "CD")), + ))) + }) + + t.Run("asymetrical_scopes", func(t *testing.T) { + expected := func() plog.Logs { + ld := plog.NewLogs() + r := ld.ResourceLogs().AppendEmpty() + r.Resource().Attributes().PutStr("resourceName", "resourceA") // resourceA + s := r.ScopeLogs().AppendEmpty() + s.Scope().SetName("scopeC") // resourceA.scopeC + l := s.LogRecords().AppendEmpty() + l.Body().SetStr("logE") // resourceA.scopeC.logE + s = r.ScopeLogs().AppendEmpty() + s.Scope().SetName("scopeD") // resourceA.scopeD + l = s.LogRecords().AppendEmpty() + l.Body().SetStr("logE") // resourceA.scopeD.logE + r = ld.ResourceLogs().AppendEmpty() + r.Resource().Attributes().PutStr("resourceName", "resourceB") // resourceB + s = r.ScopeLogs().AppendEmpty() + s.Scope().SetName("scopeD") // resourceB.scopeD + l = s.LogRecords().AppendEmpty() + l.Body().SetStr("logF") // resourceB.scopeD.logF + l = s.LogRecords().AppendEmpty() + l.Body().SetStr("logG") // resourceB.scopeD.logG + return ld + }() + assert.NoError(t, plogtest.CompareLogs(expected, plogutiltest.NewLogsFromOpts( + plogutiltest.WithResource('A', plogutiltest.WithScope('C', "E"), plogutiltest.WithScope('D', "E")), + plogutiltest.WithResource('B', plogutiltest.WithScope('D', "FG")), + ))) + }) +}