Commit Graph

989 Commits

Author SHA1 Message Date
Adrian Cole
3649852ce9 Adds the ability to configure things needed by stackdriver
We will eventually need to change the encoder to use their format. Also,
stackdriver does not support shared spans.
2018-03-20 22:18:19 +08:00
Marcin Grzejszczak
ad2b9dd39d Fixed interaction with NettyRoutingFilter
The `org.springframework.cloud.gateway.filter.NettyRoutingFilter` in SC Gateway
is adding only these headers that were set when the request came in. That means
that adding any additional headers (via instrumentation) is completely ignored.
That's why we're wrapping the `HttpClientRequest` in such a wrapper that
when `setHeaders` is called (that clears any current headers), will also add
the tracing headers

fixes gh-907
2018-03-20 11:10:14 +01:00
Marcin Grzejszczak
c0f867b52b HookRegisteringBeanDefinitionRegistryPostProcessor is a static bean 2018-03-20 09:48:03 +01:00
Marcin Grzejszczak
59b406b9ac Added a check on Feign's class 2018-03-19 15:30:17 +01:00
Marcin Grzejszczak
13ccc0bc44 Instrumenation of feign now requires usage of cloud-openfeign; fixes gh-903 2018-03-19 15:10:35 +01:00
Adrian Cole
ecf789716b Corrects Adrian's rookie move 2018-03-19 09:41:33 +08:00
Adrian Cole
36d2a848e9 Adds notes about default broker name in messaging 2018-03-17 10:06:24 +08:00
Marcin Grzejszczak
837d8ec06a Messaging spans are visible in dependency view fixes gh-867 2018-03-16 08:56:26 +01:00
Marcin Grzejszczak
9a085e3b41 Added span creation for a kafka listener; fixes gh-900 2018-03-13 14:53:00 +01:00
Adrian Cole
404bd9d7e4 Updates to Brave 4.18.0 2018-03-13 15:38:36 +08:00
Marcin Grzejszczak
bf6546c2ab Updated messaging code 2018-03-12 15:47:08 +01:00
Marcin Grzejszczak
171daaf280 Migrated to brave's span customizing handler interceptors 2018-03-11 20:45:53 +01:00
Marcin Grzejszczak
f18b3369e0 Percentage -> probability 2018-03-11 09:20:01 +01:00
Marcin Grzejszczak
c864b062aa Made bpp static 2018-03-09 12:13:38 +01:00
Marcin Grzejszczak
e8dfe1ae02 Reusing reactor context for span continuing subscriber
without this change we were not reusing a span context if there was no previous span. Instead we were overwrriting it with an empty one

with this change, if the context is there we are reusing it instead of overwriting it

fixes gh-897
2018-03-09 11:36:53 +01:00
Marcin Grzejszczak
73f9ec61f6 Added spring-kafka support; fixes gh-896 2018-03-09 10:16:26 +01:00
Marcin Grzejszczak
0474478f59 Fixed checkstyle 2018-03-09 09:14:06 +01:00
Marcin Grzejszczak
219d349bc3 Polish messaging; fixes gh-893, fixes gh-894 2018-03-09 08:48:28 +01:00
Marcin Grzejszczak
9f6801aa05 New span parser (#891) 2018-03-08 10:54:30 +08:00
Marcin Grzejszczak
102c3f86b3 Changed the remote endpoint for rabbit 2018-03-07 20:42:40 -05:00
Marcin Grzejszczak
a6e23231e1 Brought back the 128 bit property setting 2018-03-07 20:18:36 -05:00
Marcin Grzejszczak
c159949484 Made WebFilter use standard http brave components; fixes gh-889 2018-03-07 09:53:06 -05:00
Marcin Grzejszczak
375f244279 Added support for customization of HttpTracing
with this change you can define beans that will get added / set to the `HttpTracing` bean

    fixes gh-886
2018-03-07 06:41:47 -05:00
Marcin Grzejszczak
d83c9d1c31 Added instrumentation of spring amqp components
with this change we're reusing Brave to add instrumentation to any existing RabbitTemplate

    fixes gh-883
2018-03-06 14:14:55 -05:00
Adrian Cole
2e974e8ce7 Prefers "plain bean names" for community instrumentation (#885)
Instrumentation around brave is more likely to use a simple bean name
like "tracing" vs "sleuthTracing". This changes the commodity beans to
simple names so that we can avoid having to teach naming prefixes unless
necessary.

This affects the following beans:
* httpTracing
* tracing
* tracer
* spanCustomizer

This came up when integrating dubbo, as their extension loader prefers
stable bean names. For example, loading `brave.Tracing` with their
spring extension silently failed because our bean was named
"sleuthTracing". Even if we can provide instructions to override this,
seems best to dodge.
2018-03-06 12:33:23 +01:00
Marcin Grzejszczak
37a6763a44 Fixed potential NPEs 2018-03-05 10:23:44 +01:00
Marcin Grzejszczak
2f2b54c103 ignoring flakey feign test 2018-03-04 13:44:40 +01:00
Marcin Grzejszczak
86295d89a1 Added a workaround for fixes gh-881 2018-03-04 12:46:41 +01:00
Marcin Grzejszczak
347c63ea82 Aligned HTTP instrumentation with Brave (#878)
* Aligned HTTP instrumentation with Brave

with this change we remove TraceFilter and make TraceHandlerInterceptor a legacy component. All HTTP instrumentation is done via Brave.

fixes gh-873
2018-03-04 09:53:52 +01:00
Marcin Grzejszczak
a9779b15d8 Added debug logs for flakey test 2018-03-03 22:38:38 +01:00
Marcin Grzejszczak
0d136893a3 Added UserInfoRestTemplateCustomizer support; fixes gh-879 2018-03-03 19:51:05 +01:00
Marcin Grzejszczak
7ba269b9b0 Trying to fix flakey Feign tests 2018-03-02 22:32:47 +01:00
Spencer Gibb
1c8e940816 Going back to snapshots 2018-03-02 12:50:50 -05:00
Spencer Gibb
1cdf2fef73 Update SNAPSHOT to 2.0.0.M8 2018-03-02 12:48:44 -05:00
Marcin Grzejszczak
c4aa9f5235 Migrated to HttpServerSampler 2018-03-02 11:43:40 +01:00
Marcin Grzejszczak
d7a0747907 Fixed the way skip pattern and sampled flags are treated by filter
without this change whenever a span was to be skipped, a new trace was generated
with this change:
 - we first check if a trace context is already in the request
 - if sampled flag is set to 0, we reuse the Brave's mechanism of sampling
 - if URI is to be skipped we create an unsampled span BUT we reuse the trace context to build it if it was already there in the request

fixes gh-874
2018-03-02 10:48:54 +01:00
Marcin Grzejszczak
5676f3369a Fixed tests for snapshot brave 2018-03-02 09:20:17 +01:00
Marcin Grzejszczak
237593224a Moved to Brave Pom, removed double checking in WebClient 2018-03-02 08:56:56 +01:00
Marcin Grzejszczak
49840ea8da Moved double instrumentation checking to WebClient
@smaldini suggested 2 changes.

1) move the check for double instrumentation to WebClient from Netty's HttpClient. We don't want to duplicate tracing information and the perfect place to do this check is WebClient

2) Mono.defer(() -> ...) on the whole Netty HttpClient instrumentation. That way the logic of passing span around functions will be executed per request and not once.
2018-03-02 01:51:15 +01:00
Marcin Grzejszczak
7428609ff7 Added an aspect around Netty's WebClient#request method
fixes gh-806
2018-03-02 00:54:36 +01:00
Marcin Grzejszczak
0e50456ab0 Added support for Apache HttpClientBuilder and HttpAsyncClientBuilder
fixes gh-845
2018-03-01 13:21:01 +01:00
Marcin Grzejszczak
3013b21781 Added cleaning up of each operator 2018-03-01 11:15:39 +01:00
Marcin Grzejszczak
bd69d23a61 Merge branch '1.3.x' 2018-03-01 11:13:13 +01:00
Marcin Grzejszczak
f6a0e38c71 Introduced lazy span operators and HookRegisteringBeanDefinitionRegistryPostProcessor
without this change the Reactor Span operators where eagerly started. That means that beans like Tracing were required for an operation. Also, Sleuth requires to be the first to set a traceable scheduler factory. Unfortunately it wasn't always the case.

with this change the Reactor Span operators are lazy. They create span operators at runtime. Thanks to this we could create a HookRegisteringBeanDefinitionRegistryPostProcessor that ensures that the hooks are applied and the factory is set before other components get initialized.

fixes gh-866
2018-02-28 17:23:52 +01:00
Marcin Grzejszczak
2c611e9ab5 Made BPPs static beans, some of the config classes got infra role (#871)
fixes gh-870
2018-02-28 15:08:12 +01:00
Ryan Baxter
5d6b7744c2 Going back to snapshots 2018-02-27 07:42:20 -05:00
Ryan Baxter
117043191e Update SNAPSHOT to 2.0.0.M7 2018-02-27 07:40:14 -05:00
Ryan Baxter
efa4be7add Updates for new openfeign project 2018-02-22 17:02:35 -05:00
Marcin Grzejszczak
0c42fcb809 Add an option to provide additional sleuth skip patterns through configuration
without this change you always have to set the skip pattern. You can't append anything to the default pattern
with this change via the property you can provide some additional skip patterns

fixes gh-865
2018-02-22 14:42:58 +01:00
Marcin Grzejszczak
3410eea145 Inserts filter function only once; fixes gh-863 2018-02-22 13:13:54 +01:00