@@ -156,6 +156,13 @@ def test_translate_to_jaeger(self):
156
156
context = other_context , attributes = link_attributes
157
157
)
158
158
159
+ default_status_tags = [
160
+ jaeger .Tag (key = "status.code" , vType = jaeger .TagType .LONG , vLong = 0 ,),
161
+ jaeger .Tag (
162
+ key = "status.message" , vType = jaeger .TagType .STRING , vStr = None ,
163
+ ),
164
+ ]
165
+
159
166
otel_spans = [
160
167
trace .Span (
161
168
name = span_names [0 ],
@@ -176,7 +183,7 @@ def test_translate_to_jaeger(self):
176
183
otel_spans [0 ].set_attribute ("key_string" , "hello_world" )
177
184
otel_spans [0 ].set_attribute ("key_float" , 111.22 )
178
185
otel_spans [0 ].set_status (
179
- Status (StatusCanonicalCode .OK , "Example description" )
186
+ Status (StatusCanonicalCode .UNKNOWN , "Example description" )
180
187
)
181
188
otel_spans [0 ].end (end_time = end_times [0 ])
182
189
@@ -214,13 +221,16 @@ def test_translate_to_jaeger(self):
214
221
vDouble = 111.22 ,
215
222
),
216
223
jaeger .Tag (
217
- key = "status.code" , vType = jaeger .TagType .LONG , vLong = 0 ,
224
+ key = "status.code" , vType = jaeger .TagType .LONG , vLong = 2 ,
218
225
),
219
226
jaeger .Tag (
220
227
key = "status.message" ,
221
228
vType = jaeger .TagType .STRING ,
222
229
vStr = "Example description" ,
223
230
),
231
+ jaeger .Tag (
232
+ key = "error" , vType = jaeger .TagType .BOOL , vBool = True ,
233
+ ),
224
234
],
225
235
references = [
226
236
jaeger .SpanRef (
@@ -267,6 +277,7 @@ def test_translate_to_jaeger(self):
267
277
startTime = start_times [1 ] // 10 ** 3 ,
268
278
duration = durations [1 ] // 10 ** 3 ,
269
279
flags = 0 ,
280
+ tags = default_status_tags ,
270
281
),
271
282
jaeger .Span (
272
283
operationName = span_names [2 ],
@@ -277,6 +288,7 @@ def test_translate_to_jaeger(self):
277
288
startTime = start_times [2 ] // 10 ** 3 ,
278
289
duration = durations [2 ] // 10 ** 3 ,
279
290
flags = 0 ,
291
+ tags = default_status_tags ,
280
292
),
281
293
]
282
294
0 commit comments