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

Jetty httpclient support #2837

Closed
robododge opened this issue Apr 21, 2021 · 4 comments · Fixed by #3079
Closed

Jetty httpclient support #2837

robododge opened this issue Apr 21, 2021 · 4 comments · Fixed by #3079
Labels
contribution welcome Request makes sense, maintainers probably won't have time, contribution would be welcome enhancement New feature or request

Comments

@robododge
Copy link
Contributor

Hello, my company has a large distributed java platform that has centralized http communication. All communication is routed through the Jetty http client. Looking at the source code in opentelemetry-java-instrumentation, I can only find java instrumentation for Jetty on the server side.

Of course we loose the OpenTelemerty span propagation as http calls progress through the JettyHttp client. I am wondering if there is interest in OpenTelemetry support for the JettyHttp client?

@mateuszrzeszutek mateuszrzeszutek added enhancement New feature or request contribution welcome Request makes sense, maintainers probably won't have time, contribution would be welcome labels Apr 21, 2021
@mateuszrzeszutek
Copy link
Member

Hey @robododge,
Yes, definitely! We probably won't have the capacity to implement this ourselves, but we'll gladly accept external contributions.

@robododge
Copy link
Contributor Author

Hi @mateuszrzeszutek , I have some jetty-client instrumentation now working.

  1. fully working Jetty-9 client module. Uses the multiple Jetty-9.x client listener interfaces to feed an HttpClientTracer
  2. fully working Jetty-8 client module. Uses the Jetty-8.x "exchange" model to feed an HttpClientTracer.

the Jetty-9 client should work for both Jetty 9&10. I have not touched Jetty 11 or newer.

I will need to refactor and build the proper library and testing modules. Should I submit a PR when I have it cleaned up?

@trask
Copy link
Member

trask commented May 10, 2021

hey @robododge, yes, that would be great!!

@robododge
Copy link
Contributor Author

robododge commented May 25, 2021

Hi @trask, sorry it took me so long. Learning the ropes of the testing framework here was a bit of a battle. But, I have something mostly working for jetty client v9. I have some questions that I put in the PR. Here they are.

  • How to handle API drift in the minor versions. There is an API drift from Jetty9.0 to Jetty9.1 client, but after 9.1, things seem to be stable for the instrumentation. So, how typically do you handle a small gap like that, is it worth it to do a v9.1 only instrumentation?
  • How to make use of the testing framework to progress up the target library's versions to find where you cap off is, I'm thinking v10 may be the cut off but not sure. That's where I tentatively set muzzle.
  • I have two HttpClient tests that I am un sure how to solve for right now. They are two callback-related tests. I think the parent span is not being scoped properly so when the callback get's executed, it doesn't register with the existing span from the http client. connection error unopendport with callback[0]. and trace request with callback and parent[0]

EDIT - I am getting good feedback on these questions in #3079

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution welcome Request makes sense, maintainers probably won't have time, contribution would be welcome enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants