|
6 | 6 | package io.opentelemetry.javaagent.instrumentation.reactor.v3_1; |
7 | 7 |
|
8 | 8 | import static io.opentelemetry.sdk.testing.assertj.OpenTelemetryAssertions.equalTo; |
9 | | -import static io.opentelemetry.semconv.incubating.CodeIncubatingAttributes.CODE_FUNCTION; |
10 | | -import static io.opentelemetry.semconv.incubating.CodeIncubatingAttributes.CODE_NAMESPACE; |
| 9 | +import static io.opentelemetry.semconv.incubating.CodeIncubatingAttributes.CODE_FUNCTION_NAME; |
11 | 10 |
|
12 | 11 | import io.opentelemetry.api.common.Attributes; |
13 | 12 | import io.opentelemetry.api.trace.SpanKind; |
|
18 | 17 | import reactor.core.publisher.UnicastProcessor; |
19 | 18 | import reactor.test.StepVerifier; |
20 | 19 |
|
21 | | -@SuppressWarnings("deprecation") // using deprecated semconv |
22 | 20 | abstract class BaseMonoWithSpanTest extends AbstractWithSpanTest<Mono<String>, Mono<String>> { |
23 | 21 |
|
24 | 22 | @Override |
@@ -77,15 +75,14 @@ void nested() { |
77 | 75 | .hasKind(SpanKind.INTERNAL) |
78 | 76 | .hasNoParent() |
79 | 77 | .hasAttributesSatisfyingExactly( |
80 | | - equalTo(CODE_NAMESPACE, traced.getClass().getName()), |
81 | | - equalTo(CODE_FUNCTION, "outer")), |
| 78 | + equalTo( |
| 79 | + CODE_FUNCTION_NAME, traced.getClass().getName() + ".outer")), |
82 | 80 | span -> |
83 | 81 | span.hasName("TracedWithSpan.mono") |
84 | 82 | .hasKind(SpanKind.INTERNAL) |
85 | 83 | .hasParent(trace.getSpan(0)) |
86 | 84 | .hasAttributesSatisfyingExactly( |
87 | | - equalTo(CODE_NAMESPACE, traced.getClass().getName()), |
88 | | - equalTo(CODE_FUNCTION, "mono")), |
| 85 | + equalTo(CODE_FUNCTION_NAME, traced.getClass().getName() + ".mono")), |
89 | 86 | span -> |
90 | 87 | span.hasName("inner-manual") |
91 | 88 | .hasKind(SpanKind.INTERNAL) |
@@ -127,8 +124,7 @@ void nestedFromCurrent() { |
127 | 124 | .hasKind(SpanKind.INTERNAL) |
128 | 125 | .hasParent(trace.getSpan(0)) |
129 | 126 | .hasAttributesSatisfyingExactly( |
130 | | - equalTo(CODE_NAMESPACE, traced.getClass().getName()), |
131 | | - equalTo(CODE_FUNCTION, "mono")), |
| 127 | + equalTo(CODE_FUNCTION_NAME, traced.getClass().getName() + ".mono")), |
132 | 128 | span -> |
133 | 129 | span.hasName("inner-manual") |
134 | 130 | .hasKind(SpanKind.INTERNAL) |
|
0 commit comments