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

[WIP] Bootify Spring tracing #740

Closed
wants to merge 1 commit into from
Closed

[WIP] Bootify Spring tracing #740

wants to merge 1 commit into from

Conversation

ImFlog
Copy link
Contributor

@ImFlog ImFlog commented Jul 27, 2018

Intent to fix #399

@codefromthecrypt
Copy link
Member

chiming in from gitter.. so at first I was "wow" this is easy. Second a little concerned actually. For example, there are a fair amount of libraries out there which will end up doubly instrumented by accident of us auto-configuring by default. Even if we change sleuth in a later version, it will pin sleuth 2.0.x to the version before this happened and I think that won't play out nice in support.

I think this needs to be opt-in either by modularization (ex autoconfiguration buddy modules) or some other sort.

@codefromthecrypt
Copy link
Member

cc some springy folks @jonathan-lo @marcingrzejszczak @zeagord @shakuzen @devinsba @llinder

I think it is awesome to have this effort picked up. We need to tread carefully, but definitely we should tread!

@ImFlog
Copy link
Contributor Author

ImFlog commented Jul 27, 2018

As I also said in Gitter, I do have second thoughts too. I am wondering if this is not overlapping with Sleuth for example.

To create a spring-boot-instrumentation module where autoconfiguration for all spring things would be done (using conditionalOnClass for example) is a good idea IMHO.

Or we could stay as it is and not add boot support, leaving this to other library (i.e sleuth) do all the work.

@codefromthecrypt
Copy link
Member

PS especially with rest template we should be careful about double-instrumentation. The dragons...

https://github.com/spring-cloud/spring-cloud-sleuth/blob/master/spring-cloud-sleuth-core/src/main/java/org/springframework/cloud/sleuth/instrument/web/client/TraceWebClientAutoConfiguration.java

If we do something like this, I would suggest it as a "best efforts" and kick out to sleuth for anything serious.

@codefromthecrypt
Copy link
Member

related is the playground app here: openzipkin/brave-example#25

@spencergibb
Copy link

At this point isn't sleuth auto configuration of brave. Why the duplicate effort?

@codefromthecrypt
Copy link
Member

codefromthecrypt commented Jul 27, 2018 via email

@codefromthecrypt
Copy link
Member

codefromthecrypt commented Jul 28, 2018 via email

@shakuzen
Copy link
Member

I think a separate module containing the auto-configuration would be better to avoid two auto-configurations for the same thing ending up on the classpath and having to rely on ordering or dependencies on one another to avoid funkiness.

The separate module should also help with migrating Sleuth auto-configuration to the Brave module while maintenance branches of Sleuth can still upgrade but not depend on the Brave auto-config module.

I do wonder if we will be making new support issues for ourselves by having more ways to do about the same thing. It might cause confusion on when to use what, but to the degree that users have varied setups, I'm not sure how much we can avoid that while supporting them.

@jonathan-lo
Copy link
Contributor

So what I'm hearing is that this is primarily catering who are using boot 1...?

IMHO we shouldn't need to be too smart about double instrumentation - it should be a case of adding instructions to use either sleuth or brave's autoconfig

@ImFlog
Copy link
Contributor Author

ImFlog commented Jul 30, 2018

I think we agree that if we decide to autoconfigure, we will do it in a separate module.
But the question remains, do we want to provide basic autoconfiguration or do we just provide samples like openzipkin/brave-example#25 or else to redirect explicitly to Sleuth somewhere in the documentation ?

@spencergibb
Copy link

There will be dependency issues since the brave module will now depend on spring-boot and spring-cloud does not have dependencies that depend on spring-boot. If this is provided, sleuth won't be able to depend on it and will, therefore, duplicate auto-configuration.

@spencergibb
Copy link

ping @dsyer

@codefromthecrypt
Copy link
Member

codefromthecrypt commented Jul 30, 2018 via email

@codefromthecrypt
Copy link
Member

this is nearing a year old.. should we close it?

@jonathan-lo
Copy link
Contributor

We won't be needing this in the near future.

@codefromthecrypt
Copy link
Member

okie dokie. thanks for the feedback

@ImFlog ImFlog deleted the bootify branch March 7, 2019 12:21
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.

Bootify spring instrumentation
5 participants