Bumping versions
This commit is contained in:
58
README.adoc
58
README.adoc
@@ -550,6 +550,64 @@ dependencies {
|
||||
<2> Add the dependency to `spring-cloud-starter-zipkin`. That way, all nested dependencies get downloaded.
|
||||
<3> To automatically configure RabbitMQ, add the `spring-rabbit` dependency.
|
||||
|
||||
=== Overriding the auto-configuration of Zipkin
|
||||
|
||||
Spring Cloud Sleuth supports sending traces to multiple tracing systems as of version 2.1.0.
|
||||
In order to get this to work, every tracing system needs to have a `Reporter<Span>` and `Sender`.
|
||||
If you want to override the provided beans you need to give them a specific name.
|
||||
To do this you can use respectively `ZipkinAutoConfiguration.REPORTER_BEAN_NAME` and `ZipkinAutoConfiguration.SENDER_BEAN_NAME`.
|
||||
|
||||
[source,java]
|
||||
----
|
||||
|
||||
@Configuration
|
||||
protected static class MyConfig {
|
||||
|
||||
@Bean(ZipkinAutoConfiguration.REPORTER_BEAN_NAME)
|
||||
Reporter<zipkin2.Span> myReporter() {
|
||||
return AsyncReporter.create(mySender());
|
||||
}
|
||||
|
||||
@Bean(ZipkinAutoConfiguration.SENDER_BEAN_NAME)
|
||||
MySender mySender() {
|
||||
return new MySender();
|
||||
}
|
||||
|
||||
static class MySender extends Sender {
|
||||
|
||||
private boolean spanSent = false;
|
||||
|
||||
boolean isSpanSent() {
|
||||
return this.spanSent;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Encoding encoding() {
|
||||
return Encoding.JSON;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int messageMaxBytes() {
|
||||
return Integer.MAX_VALUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int messageSizeInBytes(List<byte[]> encodedSpans) {
|
||||
return encoding().listSizeInBytes(encodedSpans);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Call<Void> sendSpans(List<byte[]> encodedSpans) {
|
||||
this.spanSent = true;
|
||||
return Call.create(null);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
----
|
||||
|
||||
== Additional Resources
|
||||
|
||||
You can watch a video of https://twitter.com/reshmi9k[Reshmi Krishna] and https://twitter.com/mgrzejszczak[Marcin Grzejszczak] talking about Spring Cloud
|
||||
|
||||
12
pom.xml
12
pom.xml
@@ -29,7 +29,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-build</artifactId>
|
||||
<version>2.1.2.BUILD-SNAPSHOT</version>
|
||||
<version>2.1.3.BUILD-SNAPSHOT</version>
|
||||
<relativePath/>
|
||||
<!-- lookup parent from repository -->
|
||||
</parent>
|
||||
@@ -249,12 +249,12 @@
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<maven.compiler.testTarget>1.8</maven.compiler.testTarget>
|
||||
<maven.compiler.testSource>1.8</maven.compiler.testSource>
|
||||
<spring-cloud-build.version>2.1.2.BUILD-SNAPSHOT</spring-cloud-build.version>
|
||||
<spring-cloud-commons.version>2.1.0.BUILD-SNAPSHOT</spring-cloud-commons.version>
|
||||
<spring-cloud-gateway.version>2.1.0.BUILD-SNAPSHOT</spring-cloud-gateway.version>
|
||||
<spring-cloud-build.version>2.1.3.BUILD-SNAPSHOT</spring-cloud-build.version>
|
||||
<spring-cloud-commons.version>2.1.1.BUILD-SNAPSHOT</spring-cloud-commons.version>
|
||||
<spring-cloud-gateway.version>2.1.1.BUILD-SNAPSHOT</spring-cloud-gateway.version>
|
||||
<spring-cloud-stream.version>Fishtown.BUILD-SNAPSHOT</spring-cloud-stream.version>
|
||||
<spring-cloud-netflix.version>2.1.0.BUILD-SNAPSHOT</spring-cloud-netflix.version>
|
||||
<spring-cloud-openfeign.version>2.1.0.BUILD-SNAPSHOT</spring-cloud-openfeign.version>
|
||||
<spring-cloud-netflix.version>2.1.1.BUILD-SNAPSHOT</spring-cloud-netflix.version>
|
||||
<spring-cloud-openfeign.version>2.1.1.BUILD-SNAPSHOT</spring-cloud-openfeign.version>
|
||||
<brave.version>5.6.1</brave.version>
|
||||
<spring-security-boot-autoconfigure.version>2.1.2.RELEASE</spring-security-boot-autoconfigure.version>
|
||||
</properties>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<parent>
|
||||
<artifactId>spring-cloud-dependencies-parent</artifactId>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<version>2.1.2.BUILD-SNAPSHOT</version>
|
||||
<version>2.1.3.BUILD-SNAPSHOT</version>
|
||||
<relativePath/>
|
||||
</parent>
|
||||
<artifactId>spring-cloud-sleuth-dependencies</artifactId>
|
||||
|
||||
Reference in New Issue
Block a user