All Projects â†’ openzipkin-contrib â†’ brave-kafka-interceptor

openzipkin-contrib / brave-kafka-interceptor

Licence: Apache-2.0 license
Kafka Interceptor for Zipkin

Programming Languages

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

Projects that are alternatives of or similar to brave-kafka-interceptor

spark-twitter-sentiment-analysis
Sentiment Analysis of a Twitter Topic with Spark Structured Streaming
Stars: ✭ 55 (+83.33%)
Mutual labels:  apache-kafka
alfred-browser-tabs
🔍 Search browser tabs from Chrome, Brave, Safari, etc..
Stars: ✭ 302 (+906.67%)
Mutual labels:  brave
envoy-proxy-demos
Set of Envoy Proxy feature demos (Envoy v2 API supported)
Stars: ✭ 63 (+110%)
Mutual labels:  zipkin
kafkaer
Template based Kafka topic/cluster/ACL management
Stars: ✭ 37 (+23.33%)
Mutual labels:  apache-kafka
spring-microservices
Spring Cloud Micro Services with Eureka Discovery, Zuul Proxy, OAuth2 Security, Hystrix CircuitBreaker, Sleuth Zipkin, ELK Stack Logging, Kafka, Docker and many new features
Stars: ✭ 114 (+280%)
Mutual labels:  zipkin
brave-kt
A library that adds Kotlin friendly API for brave
Stars: ✭ 14 (-53.33%)
Mutual labels:  brave
appmetrics-zipkin
Provide zipkin integration from appmetrics
Stars: ✭ 63 (+110%)
Mutual labels:  zipkin
go-distsys
Distributed Systems programming examples in the Go programming language.
Stars: ✭ 101 (+236.67%)
Mutual labels:  zipkin
pulsar-io-kafka
Pulsar IO Kafka Connector
Stars: ✭ 24 (-20%)
Mutual labels:  apache-kafka
utools-recent-projects
uTools 插件, ćż«é€ŸæŸ„èŻąæœ€èż‘æ‰“ćŒ€çš„éĄč盼
Stars: ✭ 84 (+180%)
Mutual labels:  brave
tapper
Zipkin client for Elixir
Stars: ✭ 68 (+126.67%)
Mutual labels:  zipkin
kafka-twitter-spark-streaming
Counting Tweets Per User in Real-Time
Stars: ✭ 38 (+26.67%)
Mutual labels:  apache-kafka
esque
esque - an operational kafka tool.
Stars: ✭ 22 (-26.67%)
Mutual labels:  apache-kafka
ksql-jdbc-driver
JDBC driver for Apache Kafka
Stars: ✭ 85 (+183.33%)
Mutual labels:  apache-kafka
tictactoe-microservices-example
An example of Spring Cloud Microservices application based on books (see Links section)
Stars: ✭ 23 (-23.33%)
Mutual labels:  zipkin
kafkaSaur
Apache Kafka client for Deno
Stars: ✭ 42 (+40%)
Mutual labels:  apache-kafka
southpaw
⚟ Streaming left joins in Kafka for change data capture
Stars: ✭ 48 (+60%)
Mutual labels:  apache-kafka
zipkin-php-example
See how much time php services spend on an http request
Stars: ✭ 52 (+73.33%)
Mutual labels:  zipkin
Petabridge.Tracing.Zipkin
Professionally supported Zipkin + OpenTracing driver in C#
Stars: ✭ 35 (+16.67%)
Mutual labels:  zipkin
sample-micronaut-microservices
sample micronaut application illustrates using basic microservices patterns like distributed configuration and service discovery with Consul, distributed tracing with Zipkin, inter-service communication with micronaut http client
Stars: ✭ 38 (+26.67%)
Mutual labels:  zipkin

Brave: Kafka Interceptor

Gitter chat Build Status Maven Central

Kafka Consumer and Producer Interceptors for tracing and report to Zipkin.

These interceptors could be plugged into Kafka applications via classpath configuration.

The purpose of this instrumentation is to enable tracing for Kafka Connect and other off-the-shelf components like Kafka REST Proxy, ksqlDB, etc. For more complete tracing support, check Brave instrumentation for Kafka Clients and Kafka Streams.

Installation

Producer Interceptor

Producer Interceptor create spans when sending records. This span will only represent the time it took to execute the on_send method provided by the API, not how long to send the actual record, or any other latency.

Kafka Clients

Add Interceptor to Producer Configuration:

    producerConfig.put(ProducerConfig.INTERCEPTOR_CLASSES_CONFIG, Collections.singletonList(TracingProducerInterceptor.class));
    //or
    producerConfig.put("interceptor.classes", "brave.kafka.interceptor.TracingProducerInterceptor");

Consumer Interceptor

Consumer Interceptor create spans on consumption of records. This span will only represent the time it took execute the on_consume method provided by the API, not how long it took to commit, or any other latency.

Kafka Clients

    consumerConfig.put(ConsumerConfig.INTERCEPTOR_CLASSES_CONFIG, Collections.singletonList(TracingConsumerInterceptor.class));
    //or
    consumerConfig.put("interceptor.classes", "brave.kafka.interceptor.TracingConsumerInterceptor");

Configuration

Key Value
zipkin.sender.type Sender type: NONE(default), KAFKA, HTTP
zipkin.encoding Zipkin encoding: JSON(default), PROTO3.
zipkin.http.endpoint Zipkin HTTP Endpoint sender.
zipkin.kafka.bootstrap.servers Bootstrap Servers list to send Spans. if not present, bootstrap.servers (Kafka Client property) is used.
zipkin.local.service.name Application Service name used to tag span. Default: kafka-client.
zipkin.trace.id.128bit.enabled Trace ID 128 bit enabled, default: true
zipkin.sampler.rate Rate to sample spans. Default: 1.0
zipkin.kafka.* Use this prefix to override any kafka producer property

How to test it

Required software available:

  • Docker and Docker Compose available.
  • JDK 11+

Start by building libraries and run Docker Compose:

make docker-up # will build jars and start containers
# or
./mvnw clean package
docker-compose up -d

Create database tables:

make pg-table

Once table is created deploy source and sink connectors:

make kafka-connectors

Create a KSQL table and select to wait for results:

make ksql-stream
make ksql-select

Insert new rows:

make pg-row

Go to http://localhost:9411 Check the traces.

Traces should look like this:

Search:

Trace view:

Dependencies:

Artifacts

All artifacts publish to the group ID "io.zipkin.contrib.brave-kafka-interceptor". We use a common release version for all components.

Library Releases

Releases are at Sonatype and Maven Central

Library Snapshots

Snapshots are uploaded to Sonatype after commits to master.

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].