https://github.com/linux-china/zipkin-rsocket-server
Zipkin Server with RSocket Collector
https://github.com/linux-china/zipkin-rsocket-server
rsocket zipkin
Last synced: 11 months ago
JSON representation
Zipkin Server with RSocket Collector
- Host: GitHub
- URL: https://github.com/linux-china/zipkin-rsocket-server
- Owner: linux-china
- Created: 2020-02-26T05:43:33.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-06-14T22:47:07.000Z (over 2 years ago)
- Last Synced: 2025-04-02T02:51:15.892Z (11 months ago)
- Topics: rsocket, zipkin
- Language: Java
- Homepage:
- Size: 44.9 KB
- Stars: 3
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Zipkin Server with RSocket Collector
====================================
[](https://repo1.maven.org/maven2/org/mvnsearch/zipkin-sender-rsocket/)
[](https://hub.docker.com/r/linuxchina/zipkin-rsocket-server)
Let Zipkin server to receive spans by RSocket Protocol.
# Why RSocket
* Faster: Async and NoAck(Fire and Forget)
* Easy to integrate with Reactive System
# How to start Zipkin Server with Docker
```yaml
version: "3"
services:
zipkin:
image: linuxchina/zipkin-rsocket-server
ports:
- "9411:9411"
- "42252:42252"
```
# How to use it in Spring Boot
If you use "org.springframework.cloud:spring-cloud-starter-zipkin" and it's easy.
* Include "zipkin-sender-rsocket" dependency as following
```xml
org.springframework.cloud
spring-cloud-starter-zipkin
2.2.8.RELEASE
org.mvnsearch
zipkin-sender-rsocket
2.12.1
```
* Add following configuration in your application.properties
```
spring.autoconfigure.exclude=org.springframework.cloud.sleuth.zipkin2.ZipkinBackwardsCompatibilityAutoConfiguration
spring.zipkin.base-url=tcp://127.0.0.1:42252
spring.zipkin.encoder=proto3
spring.sleuth.sampler.rate=10
```
* Create RSocket and Zipkin Sender beans
```
@Bean
public RSocket rsocket(@Value("${spring.zipkin.base-url}") String zipkinBaseUrl) {
return RSocketFactory
.connect()
.dataMimeType("application/vnd.google.protobuf")
.transport(UriTransportRegistry.clientForUri(zipkinBaseUrl))
.start()
.block();
}
@Bean(ZipkinAutoConfiguration.SENDER_BEAN_NAME)
public Sender zipkinRSocketSender(RSocket rsocket) {
return new RSocketSender(rsocket);
}
```
* Start your application
The demo repository: https://github.com/linux-china/spring-boot-zipkin-demo
# References
* Distributed Tracing with Spring Cloud Sleuth and Spring Cloud Zipkin: https://dzone.com/articles/distributed-tracing-with-spring-cloud-sleuth-and-s