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

Refactor HttpClient typed Decorators to Tracers #893

Merged
merged 29 commits into from
Aug 7, 2020

Conversation

heyams
Copy link
Contributor

@heyams heyams commented Aug 5, 2020

Fix #828
This is the 1st PR and the rest will be in the follow-up PR. Try to divide changes into smaller PRs.

@heyams
Copy link
Contributor Author

heyams commented Aug 5, 2020

Need help with this CircleCI Muzzle validation failure:

org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':instrumentation:grizzly-client-1.9:muzzle-AssertPass-com.ning-async-http-client-1.9.29'.

I renamed all the classes under grizzly-client-1.9.

@heyams
Copy link
Contributor Author

heyams commented Aug 5, 2020

@trask
Copy link
Member

trask commented Aug 5, 2020

This test failure is not reproducible locally. Any ideas?

this one fails a ton, see #430, we even had a meeting yesterday to discuss it 😄, working towards resolving...

@trask trask mentioned this pull request Aug 5, 2020
Copy link
Member

@trask trask left a comment

Choose a reason for hiding this comment

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

thx @heyams!

@heyams heyams marked this pull request as ready for review August 5, 2020 21:05
…/auto/instrumentation/netty/v3_8/ChannelFutureListenerInstrumentation.java
Copy link
Member

@trask trask left a comment

Choose a reason for hiding this comment

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

Looks good!

We aren't currently checking everywhere if the span returned from TRACER.startSpan() is invalid before starting a scope with it. I'll open a tracking issue for that, I think it's better in a follow-up anyways.

@iNikem
Copy link
Contributor

iNikem commented Aug 6, 2020

I have review only part of all changed files. This PR is a great step forward in the right direction, thank you @heyams for doing it. But there is quite a lot of common code between existing Tracers from the "server branch" and ones introduced here. We have to consolidate that into proper hierarchy.

Now, the question is should we do that consolidation in this PR or in a follow up. I have a strong opinion about the end result should look like and I will enjoy cleaning up the hierarchy. So I will be happy to do that follow up job. But if you, @heyams , want to play with it, be my guest and do it right here :)

@heyams
Copy link
Contributor Author

heyams commented Aug 6, 2020

I have review only part of all changed files. This PR is a great step forward in the right direction, thank you @heyams for doing it. But there is quite a lot of common code between existing Tracers from the "server branch" and ones introduced here. We have to consolidate that into proper hierarchy.

Now, the question is should we do that consolidation in this PR or in a follow up. I have a strong opinion about the end result should look like and I will enjoy cleaning up the hierarchy. So I will be happy to do that follow up job. But if you, @heyams , want to play with it, be my guest and do it right here :)

I can refactor it further in another follow up PR. My goal is to finish all the decorators in a 2nd PR, then refactor the common code between server and client. I can continue with this path since I am familiar with the code now. Good point. Created #912 to track this.

Copy link
Contributor

@anuraaga anuraaga left a comment

Choose a reason for hiding this comment

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

Thanks!

@trask trask merged commit 1fcb807 into open-telemetry:master Aug 7, 2020
@trask
Copy link
Member

trask commented Aug 7, 2020

🎉

mabdinur pushed a commit to mabdinur/opentelemetry-java-instrumentation that referenced this pull request Aug 17, 2020
* initial work

* Change OkHttp decorators to tracers

* Change AkkaHttpClient decorator to tracer

* Change ClientDecorator to GrizzlyClientTracer

* Change NettyClientDecorator to Tracer

* Change netty3.8 client decorator to tracer

* Update netty4.1 client decorator to tracer

* Override startScope in child tracers when applicable

* Change KHttpDecorator to tracer

* Change HttpUrlConnectionDecorator to tracer

* Fix muzzle validation failure for grizzly client

* Fix a ratpack client test failure

* Address feedback

* Update delegate for setPeer

* Remove nested try

* Remove unnecessary null check

* Remove asserts

* Add a comment for overriding startSpan(String spanName)

* Remove an irrelevant comment

* Throw an exception when getSetter is null

* Change onPeerConnection to static

* Change getSetter() to be abstract
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.

Create HttpClientTracer and migrate from HttpClientDecorator
5 participants