| 
5 | 5 | 
 
  | 
6 | 6 | package io.opentelemetry.javaagent.instrumentation.spring.webflux.v5_0.server;  | 
7 | 7 | 
 
  | 
8 |  | -import static io.opentelemetry.api.common.AttributeKey.stringKey;  | 
9 | 8 | import static io.opentelemetry.sdk.testing.assertj.OpenTelemetryAssertions.assertThat;  | 
10 | 9 | import static io.opentelemetry.sdk.testing.assertj.OpenTelemetryAssertions.equalTo;  | 
11 | 10 | import static io.opentelemetry.sdk.testing.assertj.OpenTelemetryAssertions.satisfies;  | 
@@ -140,11 +139,6 @@ void basicGetTest(Parameter parameter) {  | 
140 | 139 |                   span.hasKind(SpanKind.INTERNAL)  | 
141 | 140 |                       .hasParent(trace.getSpan(0))  | 
142 | 141 |                       .hasAttributesSatisfyingExactly(  | 
143 |  | -                          satisfies(  | 
144 |  | -                              stringKey("spring-webflux.handler.type"),  | 
145 |  | -                              parameter.annotatedMethod == null  | 
146 |  | -                                  ? val -> val.contains(INNER_HANDLER_FUNCTION_CLASS_TAG_PREFIX)  | 
147 |  | -                                  : val -> val.isEqualTo(TestController.class.getName())),  | 
148 | 142 |                           satisfies(CODE_FUNCTION, val -> val.isEqualTo("handle")),  | 
149 | 143 |                           satisfies(  | 
150 | 144 |                               CODE_NAMESPACE,  | 
@@ -265,11 +259,6 @@ void getAsyncResponseTest(Parameter parameter) {  | 
265 | 259 |                   span.hasKind(SpanKind.INTERNAL)  | 
266 | 260 |                       .hasParent(trace.getSpan(0))  | 
267 | 261 |                       .hasAttributesSatisfyingExactly(  | 
268 |  | -                          satisfies(  | 
269 |  | -                              stringKey("spring-webflux.handler.type"),  | 
270 |  | -                              parameter.annotatedMethod == null  | 
271 |  | -                                  ? val -> val.contains(INNER_HANDLER_FUNCTION_CLASS_TAG_PREFIX)  | 
272 |  | -                                  : val -> val.isEqualTo(TestController.class.getName())),  | 
273 | 262 |                           satisfies(CODE_FUNCTION, val -> val.isEqualTo("handle")),  | 
274 | 263 |                           satisfies(  | 
275 | 264 |                               CODE_NAMESPACE,  | 
@@ -377,11 +366,6 @@ void createSpanDuringHandlerFunctionTest(Parameter parameter) {  | 
377 | 366 |                   span.hasKind(SpanKind.INTERNAL)  | 
378 | 367 |                       .hasParent(trace.getSpan(0))  | 
379 | 368 |                       .hasAttributesSatisfyingExactly(  | 
380 |  | -                          satisfies(  | 
381 |  | -                              stringKey("spring-webflux.handler.type"),  | 
382 |  | -                              parameter.annotatedMethod == null  | 
383 |  | -                                  ? val -> val.contains(INNER_HANDLER_FUNCTION_CLASS_TAG_PREFIX)  | 
384 |  | -                                  : val -> val.isEqualTo(TestController.class.getName())),  | 
385 | 369 |                           satisfies(CODE_FUNCTION, val -> val.isEqualTo("handle")),  | 
386 | 370 |                           satisfies(  | 
387 | 371 |                               CODE_NAMESPACE,  | 
@@ -448,9 +432,6 @@ void get404Test() {  | 
448 | 432 |                         .hasStatus(StatusData.error())  | 
449 | 433 |                         .hasEventsSatisfyingExactly(SpringWebfluxTest::resource404Exception)  | 
450 | 434 |                         .hasAttributesSatisfyingExactly(  | 
451 |  | -                            equalTo(  | 
452 |  | -                                stringKey("spring-webflux.handler.type"),  | 
453 |  | -                                "org.springframework.web.reactive.resource.ResourceWebHandler"),  | 
454 | 435 |                             satisfies(CODE_FUNCTION, val -> val.isEqualTo("handle")),  | 
455 | 436 |                             equalTo(  | 
456 | 437 |                                 CODE_NAMESPACE,  | 
@@ -509,9 +490,6 @@ void basicPostTest() {  | 
509 | 490 |                         .hasKind(SpanKind.INTERNAL)  | 
510 | 491 |                         .hasParent(trace.getSpan(0))  | 
511 | 492 |                         .hasAttributesSatisfyingExactly(  | 
512 |  | -                            satisfies(  | 
513 |  | -                                stringKey("spring-webflux.handler.type"),  | 
514 |  | -                                val -> val.contains(EchoHandlerFunction.class.getName())),  | 
515 | 493 |                             satisfies(CODE_FUNCTION, val -> val.isEqualTo("handle")),  | 
516 | 494 |                             satisfies(  | 
517 | 495 |                                 CODE_NAMESPACE,  | 
@@ -572,11 +550,6 @@ void getToBadEndpointTest(Parameter parameter) {  | 
572 | 550 |                                           EXCEPTION_STACKTRACE,  | 
573 | 551 |                                           val -> val.isInstanceOf(String.class))))  | 
574 | 552 |                       .hasAttributesSatisfyingExactly(  | 
575 |  | -                          satisfies(  | 
576 |  | -                              stringKey("spring-webflux.handler.type"),  | 
577 |  | -                              parameter.annotatedMethod == null  | 
578 |  | -                                  ? val -> val.contains(INNER_HANDLER_FUNCTION_CLASS_TAG_PREFIX)  | 
579 |  | -                                  : val -> val.isEqualTo(TestController.class.getName())),  | 
580 | 553 |                           satisfies(CODE_FUNCTION, val -> val.isEqualTo("handle")),  | 
581 | 554 |                           satisfies(  | 
582 | 555 |                               CODE_NAMESPACE,  | 
@@ -637,9 +610,6 @@ void redirectTest() {  | 
637 | 610 |                         .hasKind(SpanKind.INTERNAL)  | 
638 | 611 |                         .hasParent(trace.getSpan(0))  | 
639 | 612 |                         .hasAttributesSatisfyingExactly(  | 
640 |  | -                            satisfies(  | 
641 |  | -                                stringKey("spring-webflux.handler.type"),  | 
642 |  | -                                val -> val.startsWith("server.RedirectComponent$$Lambda")),  | 
643 | 613 |                             satisfies(CODE_FUNCTION, val -> val.isEqualTo("handle")),  | 
644 | 614 |                             satisfies(  | 
645 | 615 |                                 CODE_NAMESPACE,  | 
@@ -669,9 +639,6 @@ void redirectTest() {  | 
669 | 639 |                   span.hasKind(SpanKind.INTERNAL)  | 
670 | 640 |                       .hasParent(trace.getSpan(0))  | 
671 | 641 |                       .hasAttributesSatisfyingExactly(  | 
672 |  | -                          satisfies(  | 
673 |  | -                              stringKey("spring-webflux.handler.type"),  | 
674 |  | -                              val -> val.contains(INNER_HANDLER_FUNCTION_CLASS_TAG_PREFIX)),  | 
675 | 642 |                           satisfies(CODE_FUNCTION, val -> val.isEqualTo("handle")),  | 
676 | 643 |                           satisfies(  | 
677 | 644 |                               CODE_NAMESPACE,  | 
@@ -730,11 +697,6 @@ void multipleGetsToDelayingRoute(Parameter parameter) {  | 
730 | 697 |                   span.hasKind(SpanKind.INTERNAL)  | 
731 | 698 |                       .hasParent(trace.getSpan(0))  | 
732 | 699 |                       .hasAttributesSatisfyingExactly(  | 
733 |  | -                          satisfies(  | 
734 |  | -                              stringKey("spring-webflux.handler.type"),  | 
735 |  | -                              parameter.annotatedMethod == null  | 
736 |  | -                                  ? val -> val.contains(INNER_HANDLER_FUNCTION_CLASS_TAG_PREFIX)  | 
737 |  | -                                  : val -> val.isEqualTo(TestController.class.getName())),  | 
738 | 700 |                           satisfies(CODE_FUNCTION, val -> val.isEqualTo("handle")),  | 
739 | 701 |                           satisfies(  | 
740 | 702 |                               CODE_NAMESPACE,  | 
@@ -808,11 +770,6 @@ void cancelRequestTest() throws Exception {  | 
808 | 770 |                         .hasKind(SpanKind.INTERNAL)  | 
809 | 771 |                         .hasParent(trace.getSpan(0))  | 
810 | 772 |                         .hasAttributesSatisfyingExactly(  | 
811 |  | -                            satisfies(  | 
812 |  | -                                stringKey("spring-webflux.handler.type"),  | 
813 |  | -                                value ->  | 
814 |  | -                                    value.startsWith(  | 
815 |  | -                                        "server.SpringWebFluxTestApplication$$Lambda")),  | 
816 | 773 |                             satisfies(CODE_FUNCTION, val -> val.isEqualTo("handle")),  | 
817 | 774 |                             satisfies(  | 
818 | 775 |                                 CODE_NAMESPACE,  | 
 | 
0 commit comments