Skip to content
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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

cuichenli
Copy link
Contributor

part of #7345

@cuichenli cuichenli requested a review from a team as a code owner December 13, 2024 05:39
@@ -142,7 +144,13 @@ void basicGetTest(Parameter parameter) {
stringKey("spring-webflux.handler.type"),
Copy link
Member

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?

Copy link
Contributor Author

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!

Copy link
Member

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

Copy link
Contributor Author

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!

@cuichenli cuichenli changed the title Add code attributes to spring webflux controller spans Add code attributes to spring webflux controller spans and remove spring-webflux.handler.type Dec 16, 2024
@trask
Copy link
Member

trask commented Dec 16, 2024

it looks like there's a checkstyle failure

@cuichenli
Copy link
Contributor Author

it looks like there's a checkstyle failure

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())));
Copy link
Contributor

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")),
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants