File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
powerjob-4.0/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/powerjob/v4_0
xxl-job/xxl-job-common/testing/src/main/java/io/opentelemetry/instrumentation/xxljob Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 2121import java .util .ArrayList ;
2222import java .util .List ;
2323import javax .sql .DataSource ;
24+ import io .opentelemetry .semconv .incubating .CodeIncubatingAttributes ;
2425import org .junit .jupiter .api .Test ;
2526import org .junit .jupiter .api .extension .RegisterExtension ;
2627import tech .powerjob .official .processors .impl .FileCleanupProcessor ;
@@ -342,8 +343,8 @@ private static List<AttributeAssertion> attributeAssertions(
342343 List <AttributeAssertion > attributeAssertions =
343344 new ArrayList <>(
344345 asList (
345- equalTo (AttributeKey . stringKey ( "code.namespace" ) , codeNamespace ),
346- equalTo (AttributeKey . stringKey ( "code.function" ) , "process" ),
346+ equalTo (CodeIncubatingAttributes . CODE_NAMESPACE , codeNamespace ),
347+ equalTo (CodeIncubatingAttributes . CODE_FUNCTION , "process" ),
347348 equalTo (AttributeKey .stringKey ("job.system" ), "powerjob" ),
348349 equalTo (AttributeKey .longKey ("scheduling.powerjob.job.id" ), jobId ),
349350 equalTo (AttributeKey .stringKey ("scheduling.powerjob.job.type" ), jobType )));
Original file line number Diff line number Diff line change 2121import io .opentelemetry .sdk .trace .data .StatusData ;
2222import java .util .ArrayList ;
2323import java .util .List ;
24+ import io .opentelemetry .semconv .incubating .CodeIncubatingAttributes ;
2425import org .junit .jupiter .api .Assumptions ;
2526import org .junit .jupiter .api .BeforeAll ;
2627import org .junit .jupiter .api .Test ;
@@ -147,8 +148,8 @@ private static void checkXxlJob(
147148 String codeFunction ) {
148149 List <AttributeAssertion > attributeAssertions = new ArrayList <>();
149150 attributeAssertions .addAll (attributeAssertions (glueType ));
150- attributeAssertions .add (equalTo (AttributeKey . stringKey ( "code.namespace" ) , codeNamespace ));
151- attributeAssertions .add (equalTo (AttributeKey . stringKey ( "code.function" ) , codeFunction ));
151+ attributeAssertions .add (equalTo (CodeIncubatingAttributes . CODE_NAMESPACE , codeNamespace ));
152+ attributeAssertions .add (equalTo (CodeIncubatingAttributes . CODE_FUNCTION , codeFunction ));
152153
153154 checkXxlJob (spanName , statusData , attributeAssertions );
154155 }
You can’t perform that action at this time.
0 commit comments