All Projects → smoketurner → dropwizard-zipkin

smoketurner / dropwizard-zipkin

Licence: Apache-2.0 license
Dropwizard Zipkin Bundle

Programming Languages

java
68154 projects - #9 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to dropwizard-zipkin

Spring Cloud Sleuth
Distributed tracing for spring cloud
Stars: ✭ 1,531 (+3089.58%)
Mutual labels:  instrumentation, tracing, zipkin, distributed-tracing, zipkin-brave
Brave
Java distributed tracing implementation compatible with Zipkin backend services.
Stars: ✭ 2,117 (+4310.42%)
Mutual labels:  instrumentation, tracing, zipkin, distributed-tracing, zipkin-brave
Zipkin Go
Zipkin tracer library for go
Stars: ✭ 435 (+806.25%)
Mutual labels:  instrumentation, tracing, zipkin, distributed-tracing
Opencensus Node
A stats collection and distributed tracing framework
Stars: ✭ 249 (+418.75%)
Mutual labels:  instrumentation, tracing, zipkin, distributed-tracing
Zipkin Go Opentracing
OpenTracing Bridge for Zipkin Go
Stars: ✭ 472 (+883.33%)
Mutual labels:  instrumentation, tracing, zipkin, distributed-tracing
easeagent
An agent component for the Java system
Stars: ✭ 437 (+810.42%)
Mutual labels:  tracing, zipkin, distributed-tracing, zipkin-brave
Brave Opentracing
Bridge between OpenTracing and Brave
Stars: ✭ 64 (+33.33%)
Mutual labels:  instrumentation, tracing, zipkin, distributed-tracing
Zipkin Php
Zipkin instrumentation for PHP
Stars: ✭ 190 (+295.83%)
Mutual labels:  instrumentation, zipkin, distributed-tracing
nginx-opentracing
Instrument nginx for OpenTracing.
Stars: ✭ 21 (-56.25%)
Mutual labels:  instrumentation, tracing, zipkin
zipkin-ruby-opentracing
OpenTracing Tracer implementation for Zipkin in Ruby
Stars: ✭ 15 (-68.75%)
Mutual labels:  instrumentation, tracing, zipkin
zipkin-cpp-opentracing
OpenTracing Tracer implementation for Zipkin in C++
Stars: ✭ 46 (-4.17%)
Mutual labels:  instrumentation, tracing, zipkin
Zipkin Js
Zipkin instrumentation for Node.js and browsers
Stars: ✭ 489 (+918.75%)
Mutual labels:  tracing, zipkin, distributed-tracing
ruby-sensor
💎 Ruby Distributed Tracing & Metrics Sensor for Instana
Stars: ✭ 23 (-52.08%)
Mutual labels:  instrumentation, tracing, distributed-tracing
Opencensus Web
A stats collection and distributed tracing framework
Stars: ✭ 168 (+250%)
Mutual labels:  instrumentation, tracing, distributed-tracing
Zipkin
Zipkin is a distributed tracing system
Stars: ✭ 14,969 (+31085.42%)
Mutual labels:  tracing, zipkin, distributed-tracing
Opencensus Java
A stats collection and distributed tracing framework
Stars: ✭ 640 (+1233.33%)
Mutual labels:  tracing, zipkin, distributed-tracing
go-sensor
🚀 Go Distributed Tracing & Metrics Sensor for Instana
Stars: ✭ 90 (+87.5%)
Mutual labels:  instrumentation, tracing, distributed-tracing
thundra-agent-python
Thundra Lambda Python Agent
Stars: ✭ 36 (-25%)
Mutual labels:  instrumentation, tracing, distributed-tracing
gateway
A proxy to buffer and forward metrics, events, and traces.
Stars: ✭ 94 (+95.83%)
Mutual labels:  tracing, zipkin, distributed-tracing
pitchfork
Convert tracing data between Zipkin and Haystack formats
Stars: ✭ 40 (-16.67%)
Mutual labels:  tracing, zipkin, distributed-tracing

Dropwizard Zipkin Bundle

Build Status Maven Central GitHub license Become a Patron

A bundle for submitting tracing data to Zipkin from Dropwizard applications. Internally, this library uses Brave to interface a Zipkin collector.

Dependency Info

<dependency>
    <groupId>com.smoketurner.dropwizard</groupId>
    <artifactId>zipkin-core</artifactId>
    <version>2.0.7-1</version>
</dependency>

Beginning with v1.2.2-4, if you are using the Kafka sender, you must explicitly add the kafka-clients dependency into your pom.xml as it has been excluded from the zipkin-core module.

<dependency>
    <groupId>org.apache.kafka</groupId>
    <artifactId>kafka-clients</artifactId>
    <version>2.2.1</version>
</dependency>

Usage

Add a ZipkinBundle to your Application class.

private ZipkinBundle<HelloWorldConfiguration> zipkinBundle;

@Override
public void initialize(Bootstrap<HelloWorldConfiguration> bootstrap) {
  zipkinBundle = new ZipkinBundle<HelloWorldConfiguration>(getName()) {
    @Override
    public ZipkinFactory getZipkinFactory(HelloWorldConfiguration configuration) {
      return configuration.getZipkinFactory();
    }
  };
  bootstrap.addBundle(zipkinBundle);
}

@Override
public void run(HelloWorldConfiguration configuration, Environment environment) throws Exception {
  final Optional<HttpTracing> tracing = zipkinBundle.getHttpTracing();
}

Configuration

For configuring the Zipkin connection, there is a ZipkinFactory:

zipkin:

  # Required properties
  # Whether tracing is enabled or not (defaults to true)
  enabled: true
  # Listening IP address of the service
  serviceHost: 192.168.1.100
  # Listening port of the service
  servicePort: 8080

  # Optional properties
  # Span collector to use (console, http, kafka or empty)
  collector: http
  # If using the http collector, provide the baseUrl
  baseUrl: http://127.0.0.1:9411/
  # If using the http collector, timeout out when connecting (defaults to 10s)
  connectTimeout: 10s
  # If using the http collector, timeout out when reading the response (defaults to 60s)
  readTimeout: 60s
  # If using the kafka collector, provide the Kafka bootstrap servers
  bootstrapServers: 127.0.0.1:9092;10.0.1.1:9092

Example Application

This bundle includes a modified version of the HelloWorldApplication from Dropwizard's Getting Started documentation.

You can execute this application by first starting Zipkin on your local machine then running:

./mvnw clean package
java -jar zipkin-example/target/zipkin-example-*-SNAPSHOT.jar server zipkin-example/hello-world.yml

This will start the application on port 8080 (admin port 8180). This application demonstrations the following Zipkin integration points:

  • You can use the included ZipkinClientBuilder to construct an instrumented JerseyClient's that will send span traces to Zipkin
  • The service will send request and response traces to Zipkin

Support

Please file bug reports and feature requests in GitHub issues.

License

Copyright (c) 2020 Smoke Turner, LLC

This library is licensed under the Apache License, Version 2.0.

See http://www.apache.org/licenses/LICENSE-2.0.html or the LICENSE file in this repository for the full license text.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].