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 instrumentation for jakarta3 #3210

Merged
merged 1 commit into from
Dec 2, 2021

Conversation

pdenis1
Copy link
Contributor

@pdenis1 pdenis1 commented Nov 17, 2021

Due to trademark disputes between Eclipse and Oracle over the use of the javax namespace, the major webservers have had to migrate from javax.ws.rs to the jakarta.ws.rs namespace.

https://eclipse-foundation.blog/2019/05/03/jakarta-ee-java-trademarks/
https://dzone.com/articles/from-javax-to-jakarta-a-simple-proof-of-concept

When we upgraded to Jetty 11 (and thus also to jakarta3), we lost a lot of information and granularity in our DD traces. This PR adds support for jakarta.ws.rs version 3.0+

@pdenis1 pdenis1 requested a review from a team as a code owner November 17, 2021 17:58
@pdenis1 pdenis1 closed this Nov 17, 2021
@pdenis1 pdenis1 deleted the pason-jakarta3-support branch November 17, 2021 17:59
@pdenis1 pdenis1 restored the pason-jakarta3-support branch November 17, 2021 18:00
@pdenis1 pdenis1 reopened this Nov 17, 2021
@bantonsson
Copy link
Contributor

Hi @pdenis1, and thanks for the contribution. There seems to be some files missing since the build fails to find the datadog.trace.bootstrap.instrumentation.decorator.RouteHandlerDecorator

@devinsba
Copy link
Contributor

RouteHandlerDecorator missing means that this needs to be rebased and updated to match the changes in the servlet instrumentation. RouteHandlerDecorator was removed recently

@pdenis1
Copy link
Contributor Author

pdenis1 commented Nov 29, 2021 via email

@pdenis1 pdenis1 force-pushed the pason-jakarta3-support branch 2 times, most recently from bc1068e to a17b985 Compare December 2, 2021 00:24
@pdenis1
Copy link
Contributor Author

pdenis1 commented Dec 2, 2021

I added test coverage, ran the muzzle and test targets locally and everything is passing. I pushed those changes and the circleci build failed due to jakarta.ws.rs being compiled for java 8+, so I set the minJavaVersionForTests to VERSION_1_8. I'm not sure why the above 2 tests are failing though? Any ideas?

@devinsba @bantonsson

@bantonsson
Copy link
Contributor

@pdenis1 It's nothing to worry about. Unfortunately our test suite has a bit of flakiness to it (yes we are working on removing that), so I restarted the failed tests and now they are green.

Copy link
Contributor

@devinsba devinsba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll let someone else take a look but this looks good! Thanks!

PS the failing tests passed after the build was rerun

@bantonsson bantonsson added tag: community Community contribution inst: others All other instrumentations labels Dec 2, 2021
Copy link
Contributor

@bantonsson bantonsson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Thank you for the contribution @pdenis1

@bantonsson
Copy link
Contributor

@pdenis1 would you mind squashing all the commits into one? I don't trust the squash-and-merge button to attribute the work properly, and I don't want small fixup commits on the main branch.

@pdenis1
Copy link
Contributor Author

pdenis1 commented Dec 2, 2021

@bantonsson squashed and pushed!

@bantonsson bantonsson merged commit efb84d2 into DataDog:master Dec 2, 2021
@bantonsson bantonsson added this to the 0.91.0 milestone Dec 2, 2021
@pdenis1 pdenis1 deleted the pason-jakarta3-support branch December 2, 2021 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
inst: others All other instrumentations tag: community Community contribution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants