@@ -296,6 +296,7 @@ func Test_NewPriorityContextInferrer_DefaultPriorityList(t *testing.T) {
296
296
"metric" ,
297
297
"spanevent" ,
298
298
"span" ,
299
+ "profile" ,
299
300
"scope" ,
300
301
"instrumentation_scope" ,
301
302
"resource" ,
@@ -316,6 +317,7 @@ func Test_NewPriorityContextInferrer_InferStatements_DefaultContextsOrder(t *tes
316
317
"datapoint" : newDummyPriorityContextInferrerCandidate (true , true , []string {"scope" , "instrumentation_scope" , "resource" }),
317
318
"span" : newDummyPriorityContextInferrerCandidate (true , true , []string {"spanevent" , "scope" , "instrumentation_scope" , "resource" }),
318
319
"spanevent" : newDummyPriorityContextInferrerCandidate (true , true , []string {"scope" , "instrumentation_scope" , "resource" }),
320
+ "profile" : newDummyPriorityContextInferrerCandidate (true , true , []string {"profile" , "scope" , "instrumentation_scope" , "resource" }),
319
321
"scope" : newDummyPriorityContextInferrerCandidate (true , true , []string {"resource" }),
320
322
"instrumentation_scope" : newDummyPriorityContextInferrerCandidate (true , true , []string {"resource" }),
321
323
"resource" : newDummyPriorityContextInferrerCandidate (true , true , []string {}),
@@ -386,6 +388,16 @@ func Test_NewPriorityContextInferrer_InferStatements_DefaultContextsOrder(t *tes
386
388
statement : `set(span.name, "foo") where spanevent.name != nil and scope.name != nil and resource.attributes["foo"] != nil` ,
387
389
expected : "spanevent" ,
388
390
},
391
+ {
392
+ name : "profile,instrumentation_scope,resource" ,
393
+ statement : `set(profile.name, "foo") where profile.name != nil and instrumentation_scope.name != nil and resource.attributes["foo"] != nil` ,
394
+ expected : "profile" ,
395
+ },
396
+ {
397
+ name : "profile,scope,resource" ,
398
+ statement : `set(profile.name, "foo") where profile.name != nil and scope.name != nil and resource.attributes["foo"] != nil` ,
399
+ expected : "profile" ,
400
+ },
389
401
{
390
402
name : "resource" ,
391
403
statement : `set(resource.attributes["bar"], "foo") where dummy.attributes["foo"] != nil` ,
@@ -409,6 +421,7 @@ func Test_NewPriorityContextInferrer_InferConditions_DefaultContextsOrder(t *tes
409
421
"datapoint" : newDummyPriorityContextInferrerCandidate (true , true , []string {"scope" , "instrumentation_scope" , "resource" }),
410
422
"span" : newDummyPriorityContextInferrerCandidate (true , true , []string {"spanevent" , "scope" , "instrumentation_scope" , "resource" }),
411
423
"spanevent" : newDummyPriorityContextInferrerCandidate (true , true , []string {"scope" , "instrumentation_scope" , "resource" }),
424
+ "profile" : newDummyPriorityContextInferrerCandidate (true , true , []string {"profile" , "scope" , "instrumentation_scope" , "resource" }),
412
425
"scope" : newDummyPriorityContextInferrerCandidate (true , true , []string {"resource" }),
413
426
"instrumentation_scope" : newDummyPriorityContextInferrerCandidate (true , true , []string {"resource" }),
414
427
"resource" : newDummyPriorityContextInferrerCandidate (true , true , []string {}),
@@ -479,6 +492,16 @@ func Test_NewPriorityContextInferrer_InferConditions_DefaultContextsOrder(t *tes
479
492
condition : `span.name != nil and spanevent.name != nil and scope.name != nil and resource.attributes["foo"] != nil` ,
480
493
expected : "spanevent" ,
481
494
},
495
+ {
496
+ name : "profile,instrumentation_scope,resource" ,
497
+ condition : `profile.name != nil and profile.name != nil and instrumentation_scope.name != nil and resource.attributes["foo"] != nil` ,
498
+ expected : "profile" ,
499
+ },
500
+ {
501
+ name : "profile,scope,resource" ,
502
+ condition : `profile.name != nil and profile.name != nil and scope.name != nil and resource.attributes["foo"] != nil` ,
503
+ expected : "profile" ,
504
+ },
482
505
{
483
506
name : "resource" ,
484
507
condition : `resource.attributes["bar"] != nil and dummy.attributes["foo"] != nil` ,
0 commit comments