File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change 85
85
expect ( subject . origin ) . to eq 'synthetics'
86
86
end
87
87
end
88
+
89
+ # Metadata values can also be arrays
90
+ # https://github.com/grpc/grpc-go/blob/master/Documentation/grpc-metadata.md
91
+ context 'given populated metadata in array format' do
92
+ let ( :metadata ) do
93
+ { 'x-datadog-trace-id' => [ '12345' , '67890' ] ,
94
+ 'x-datadog-parent-id' => [ '98765' , '43210' ] ,
95
+ 'x-datadog-sampling-priority' => [ '0' ] ,
96
+ 'x-datadog-origin' => [ 'synthetics' ] }
97
+ end
98
+
99
+ it 'returns a populated context with the first metadata array values' do
100
+ expect ( subject . trace_id ) . to eq 12345
101
+ expect ( subject . span_id ) . to eq 98765
102
+ expect ( subject . sampling_priority ) . to be_zero
103
+ expect ( subject . origin ) . to eq 'synthetics'
104
+ end
105
+ end
88
106
end
89
107
end
You can’t perform that action at this time.
0 commit comments