@@ -225,7 +225,28 @@ def _get_sdk_log_data() -> List[LogData]:
225
225
),
226
226
)
227
227
228
- return [log1 , log2 , log3 , log4 , log5 , log6 , log7 ]
228
+ log8 = LogData (
229
+ log_record = SDKLogRecord (
230
+ timestamp = 1644650584292683044 ,
231
+ observed_timestamp = 1644650584292683044 ,
232
+ trace_id = 212592107417388365804938480559624925566 ,
233
+ span_id = 6077757853989569466 ,
234
+ trace_flags = TraceFlags (0x01 ),
235
+ severity_text = "INFO" ,
236
+ severity_number = SeverityNumber .INFO ,
237
+ body = "Test export of extended attributes" ,
238
+ resource = SDKResource ({}),
239
+ attributes = {
240
+ "extended" : {
241
+ "sequence" : [{"inner" : "mapping" , "none" : None }]
242
+ }
243
+ },
244
+ ),
245
+ instrumentation_scope = InstrumentationScope (
246
+ "extended_name" , "extended_version"
247
+ ),
248
+ )
249
+ return [log1 , log2 , log3 , log4 , log5 , log6 , log7 , log8 ]
229
250
230
251
def get_test_logs (
231
252
self ,
@@ -265,7 +286,8 @@ def get_test_logs(
265
286
"Do not go gentle into that good night. Rage, rage against the dying of the light"
266
287
),
267
288
attributes = _encode_attributes (
268
- {"a" : 1 , "b" : "c" }
289
+ {"a" : 1 , "b" : "c" },
290
+ allow_null = True ,
269
291
),
270
292
)
271
293
],
@@ -295,7 +317,8 @@ def get_test_logs(
295
317
{
296
318
"filename" : "model.py" ,
297
319
"func_name" : "run_method" ,
298
- }
320
+ },
321
+ allow_null = True ,
299
322
),
300
323
)
301
324
],
@@ -326,7 +349,8 @@ def get_test_logs(
326
349
{
327
350
"filename" : "model.py" ,
328
351
"func_name" : "run_method" ,
329
- }
352
+ },
353
+ allow_null = True ,
330
354
),
331
355
)
332
356
],
@@ -336,7 +360,8 @@ def get_test_logs(
336
360
name = "scope_with_attributes" ,
337
361
version = "scope_with_attributes_version" ,
338
362
attributes = _encode_attributes (
339
- {"one" : 1 , "two" : "2" }
363
+ {"one" : 1 , "two" : "2" },
364
+ allow_null = True ,
340
365
),
341
366
),
342
367
schema_url = "instrumentation_schema_url" ,
@@ -360,7 +385,8 @@ def get_test_logs(
360
385
{
361
386
"filename" : "model.py" ,
362
387
"func_name" : "run_method" ,
363
- }
388
+ },
389
+ allow_null = True ,
364
390
),
365
391
)
366
392
],
@@ -416,7 +442,8 @@ def get_test_logs(
416
442
severity_number = SeverityNumber .DEBUG .value ,
417
443
body = _encode_value ("To our galaxy" ),
418
444
attributes = _encode_attributes (
419
- {"a" : 1 , "b" : "c" }
445
+ {"a" : 1 , "b" : "c" },
446
+ allow_null = True ,
420
447
),
421
448
),
422
449
],
@@ -471,6 +498,43 @@ def get_test_logs(
471
498
),
472
499
],
473
500
),
501
+ PB2ScopeLogs (
502
+ scope = PB2InstrumentationScope (
503
+ name = "extended_name" ,
504
+ version = "extended_version" ,
505
+ ),
506
+ log_records = [
507
+ PB2LogRecord (
508
+ time_unix_nano = 1644650584292683044 ,
509
+ observed_time_unix_nano = 1644650584292683044 ,
510
+ trace_id = _encode_trace_id (
511
+ 212592107417388365804938480559624925566
512
+ ),
513
+ span_id = _encode_span_id (
514
+ 6077757853989569466 ,
515
+ ),
516
+ flags = int (TraceFlags (0x01 )),
517
+ severity_text = "INFO" ,
518
+ severity_number = SeverityNumber .INFO .value ,
519
+ body = _encode_value (
520
+ "Test export of extended attributes"
521
+ ),
522
+ attributes = _encode_attributes (
523
+ {
524
+ "extended" : {
525
+ "sequence" : [
526
+ {
527
+ "inner" : "mapping" ,
528
+ "none" : None ,
529
+ }
530
+ ]
531
+ }
532
+ },
533
+ allow_null = True ,
534
+ ),
535
+ ),
536
+ ],
537
+ ),
474
538
],
475
539
),
476
540
]
0 commit comments