-
Notifications
You must be signed in to change notification settings - Fork 868
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add code attributes to spring webflux controller spans and remove spring-webflux.handler.type
#12887
base: main
Are you sure you want to change the base?
Add code attributes to spring webflux controller spans and remove spring-webflux.handler.type
#12887
Conversation
@@ -142,7 +144,13 @@ void basicGetTest(Parameter parameter) { | |||
stringKey("spring-webflux.handler.type"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is spring-webflux.handler.type
redundant now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah i think it is redundant now. but not sure what is the recommended procedure of deprecating a metric? can we just remove it or we should mark it deprecated and remove it in a future release? thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since it's already an opt-in experimental attribute, I think it's ok to just remove it and mention in the PR title so that I will remember to add it in the migration notes when writing the change log
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i have removed it in the latest change, and updated the title. please kindly have a look. thanks!
…nstrumentation into capture-code-attributes-spring-webflux
spring-webflux.handler.type
it looks like there's a checkstyle failure |
…nstrumentation into capture-code-attributes-spring-webflux
sorry about that, fixed it in the latest change. |
parameter.annotatedMethod == null | ||
? val -> val.contains(INNER_HANDLER_FUNCTION_CLASS_TAG_PREFIX) | ||
: val -> val.isEqualTo(TestController.class.getName()))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
previously used TestController
is more useful than org.springframework.web.method.HandlerMethod
that is reported after these changes
@@ -485,9 +490,10 @@ void basicPostTest() { | |||
.hasKind(SpanKind.INTERNAL) | |||
.hasParent(trace.getSpan(0)) | |||
.hasAttributesSatisfyingExactly( | |||
satisfies(CODE_FUNCTION, val -> val.isEqualTo("handle")), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you are testing for exact value use equalTo(CODE_FUNCTION, "handle")
instead of satisfies
part of #7345