@@ -12,6 +12,7 @@ import (
1212 "github.com/stretchr/testify/require"
1313 "go.opentelemetry.io/collector/pdata/pcommon"
1414 "go.opentelemetry.io/collector/pdata/ptrace"
15+ "go.opentelemetry.io/collector/pdata/xpdata"
1516
1617 "github.com/jaegertracing/jaeger/internal/jptrace"
1718 "github.com/jaegertracing/jaeger/internal/storage/v2/clickhouse/tracestore/dbmodel"
@@ -126,6 +127,29 @@ func requireComplexAttrs(t *testing.T, expectedKeys []string, expectedVals []str
126127 decoded , err := base64 .StdEncoding .DecodeString (expectedVals [i ])
127128 require .NoError (t , err )
128129 require .Equal (t , decoded , val .Bytes ().AsRaw ())
130+ case strings .HasPrefix (k , "@map@" ):
131+ key := strings .TrimPrefix (expectedKeys [i ], "@map@" )
132+ val , ok := attrs .Get (key )
133+ require .True (t , ok )
134+ decoded , err := base64 .StdEncoding .DecodeString (expectedVals [i ])
135+ require .NoError (t , err )
136+
137+ m := & xpdata.JSONUnmarshaler {}
138+ expectedVal , err := m .UnmarshalValue (decoded )
139+ require .NoError (t , err )
140+ require .True (t , expectedVal .Map ().Equal (val .Map ()))
141+ case strings .HasPrefix (k , "@slice@" ):
142+ key := strings .TrimPrefix (expectedKeys [i ], "@slice@" )
143+ val , ok := attrs .Get (key )
144+
145+ require .True (t , ok )
146+ decoded , err := base64 .StdEncoding .DecodeString (expectedVals [i ])
147+ require .NoError (t , err )
148+
149+ m := & xpdata.JSONUnmarshaler {}
150+ expectedVal , err := m .UnmarshalValue (decoded )
151+ require .NoError (t , err )
152+ require .True (t , expectedVal .Slice ().Equal (val .Slice ()))
129153 default :
130154 t .Fatalf ("unsupported complex attribute key: %s" , k )
131155 }
0 commit comments