servicecomb-java-chassis
servicecomb-java-chassis copied to clipboard
Bump zipkin-reporter.version from 2.17.1 to 3.3.0
Bumps zipkin-reporter.version
from 2.17.1 to 3.3.0.
Updates io.zipkin.reporter2:zipkin-reporter
from 2.17.1 to 3.3.0
Updates io.zipkin.reporter2:zipkin-sender-okhttp3
from 2.17.1 to 3.3.0
Release notes
Sourced from io.zipkin.reporter2:zipkin-sender-okhttp3's releases.
Zipkin Reporter 3.3 adds a
BaseHttpSender
type, which eases http library integration. It also addsHttpEndpointSupplier
which supports dynamic endpoint discovery such as from Eureka, as well utilities to create constants or rate-limit suppliers. Finally, brave users get a native PROTO3 encoder through the newMutableSpanBytesEncoder
type.These features were made in support of spring-boot, but available to any user with no new dependencies. For example, the PROTO encoder adds no library dependency, even if it increases the size of zipkin-reporter-brave by a couple dozen KB. A lion's share of thanks goes to
@reta
and@anuraaga
who were on design and review duty for several days leading to this.Here's an example of pulling most of these things together, integrating a sender with spring-cloud-loadbalancer (a client-side loadbalancer library).
This endpoint supplier will get the configuration endpoint value and look up the next target to use with the
loadBalancerClient
. The rate limiter will ensure a gap of 30 seconds between queries. While below is hard-coded, it covers some routine advanced features formerly only available in spring-cloud-sleuth. Now, anyone can use them!@Configuration(proxyBeanMethods = false) public class ZipkinDiscoveryConfiguration { @Bean HttpEndpointSupplier.Factory loadbalancerEndpoints(LoadBalancerClient loadBalancerClient) { LoadBalancerHttpEndpointSupplier.Factory httpEndpointSupplierFactory = new LoadBalancerHttpEndpointSupplier.Factory(loadBalancerClient); // don't ask more than 30 seconds (just to show) return HttpEndpointSuppliers.newRateLimitedFactory(httpEndpointSupplierFactory, 30); }
record LoadBalancerHttpEndpointSupplier(LoadBalancerClient loadBalancerClient, URI virtualURL) implements HttpEndpointSupplier { record Factory(LoadBalancerClient loadBalancerClient) implements HttpEndpointSupplier.Factory {
@Override public HttpEndpointSupplier create(String endpoint) { return new LoadBalancerHttpEndpointSupplier(loadBalancerClient, URI.create(endpoint)); } }
@Override public String get() { ServiceInstance instance = loadBalancerClient.choose(virtualURL.getHost()); if (instance != null) { return instance.getUri() + virtualURL.getPath(); } throw new IllegalArgumentException(virtualURL.getHost() + " is not registered"); }
@Override public void close() { }
@Override public String toString() { return "LoadBalancer{" + virtualURL + "}"; }
} }
Full Changelog: https://github.com/openzipkin/zipkin-reporter-java/compare/3.2.1..3.3.0
Zipkin Reporter 3.2 deprecates
Sender
for a simpler typeBytesMessageSender
. This only supports synchronous invocation (as used by the async reporters in the reporting thread) and requires senders to pass an empty list vs a complicated and usually implementedcheck()
function. The result is being able to implement a custom sender in less than 50 lines including imports like below! Thank a lot to@anuraaga
and@reta
for the review on this.package brave.example; </tr></table>
... (truncated)
Commits
9b4489e
[maven-release-plugin] prepare release 3.3.0ee69d43
Renames HttpSender to BaseHttpSender (#256)9f3a99a
Adds rate limited HTTP endpoint supplier and factory (#255)51bac2a
Makes constant endpoint an api with implementations available (#254)ec4e01c
Adds HttpSender to aid proper handling of HttpEndpointSupplier (#253)be50820
brave: adds PROTO3 encoding (#252)bb3f5b7
Decreases switch statements and deprecates BytesMessageEncoder (#250)b5fbad8
Pulls up ConstantHttpEndpointSupplier (#251)0f03cf6
Adds HttpEndpointSupplier to allow generic discovery of HTTP endpoints (#249)334499c
[maven-release-plugin] prepare for next development iteration- Additional commits viewable in compare view
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase
.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
-
@dependabot rebase
will rebase this PR -
@dependabot recreate
will recreate this PR, overwriting any edits that have been made to it -
@dependabot merge
will merge this PR after your CI passes on it -
@dependabot squash and merge
will squash and merge this PR after your CI passes on it -
@dependabot cancel merge
will cancel a previously requested merge and block automerging -
@dependabot reopen
will reopen this PR if it is closed -
@dependabot close
will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually -
@dependabot show <dependency name> ignore conditions
will show all of the ignore conditions of the specified dependency -
@dependabot ignore this major version
will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) -
@dependabot ignore this minor version
will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) -
@dependabot ignore this dependency
will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)