diff --git a/pkg/ottl/e2e/e2e_test.go b/pkg/ottl/e2e/e2e_test.go index d0c1d1e2ca29..66db6828559a 100644 --- a/pkg/ottl/e2e/e2e_test.go +++ b/pkg/ottl/e2e/e2e_test.go @@ -958,6 +958,14 @@ func Test_e2e_converters(t *testing.T) { thing2.PutInt("value", 5) }, }, + { + statement: `set(attributes["test"], SliceToMap(attributes["things"], ["name"], ["value"]))`, + want: func(tCtx ottllog.TransformContext) { + m := tCtx.GetLogRecord().Attributes().PutEmptyMap("test") + m.PutInt("foo", 2) + m.PutInt("bar", 5) + }, + }, } for _, tt := range tests {