Coder Social home page Coder Social logo

zipkin-rsocket-server's Introduction

Zipkin Server with RSocket Collector

Maven Docker Image

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

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
<dependencies>
    <dependency>
      <groupId>org.springframework.cloud</groupId>
      <artifactId>spring-cloud-starter-zipkin</artifactId>
      <version>2.2.8.RELEASE</version>
    </dependency>
    <dependency>
      <groupId>org.mvnsearch</groupId>
      <artifactId>zipkin-sender-rsocket</artifactId>
      <version>2.12.1</version>
    </dependency>
</dependencies>
  • 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

zipkin-rsocket-server's People

Contributors

linux-china avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.