Skip to content
Permalink
Browse files

feat: to openzipkin

  • Loading branch information...
jeqo committed Oct 9, 2019
1 parent ba150ce commit f58454f958db0b7c89501811041422f9a2338daf
@@ -0,0 +1,23 @@
#
# Copyright 2016-2018 The OpenZipkin Authors
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
# in compliance with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed under the License
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
# or implied. See the License for the specific language governing permissions and limitations under
# the License.
#

root = true

[*]
charset = utf-8
end_of_line = lf
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true
@@ -0,0 +1,33 @@
# Contributing to Zipkin

If you would like to contribute code, fork this GitHub repository and
send a pull request (on a branch other than `master` or `gh-pages`).

When submitting code, please apply [Square Code Style](https://github.com/square/java-code-styles).
* If the settings import correctly, CodeStyle/Java will be named Square and use 2 space tab and indent, with 4 space continuation indent.

## License

By contributing your code, you agree to license your contribution under
the terms of the [APLv2](LICENSE).

All files are released with the Apache 2.0 license.

If you are adding a new file it should have a header like below. This
can be automatically added by running `./mvnw com.mycila:license-maven-plugin:format`.

```
/**
* Copyright 2019 The OpenZipkin Authors
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
```
@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2018-2019 The OpenZipkin Authors
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License
is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
or implied. See the License for the specific language governing permissions and limitations under
the License.
-->
<settings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers>
<server>
<id>sonatype</id>
<username>${env.SONATYPE_USER}</username>
<password>${env.SONATYPE_PASSWORD}</password>
</server>
<server>
<id>bintray</id>
<username>${env.BINTRAY_USER}</username>
<password>${env.BINTRAY_KEY}</password>
</server>
<server>
<id>jfrog-snapshots</id>
<username>${env.BINTRAY_USER}</username>
<password>${env.BINTRAY_KEY}</password>
</server>
<server>
<id>github.com</id>
<username>zipkinci</username>
<password>${env.GH_TOKEN}</password>
</server>
</servers>
</settings>
@@ -1,12 +1,48 @@
---
# Run `travis lint` when changing this file to avoid breaking the build.

cache:
directories:
- $HOME/.m2

language: java

jdk:
- oraclejdk8
jdk: openjdk11

before_install:
# allocate commits to CI, not the owner of the deploy key
- git config user.name "zipkinci"
- git config user.email "zipkinci+zipkin-dev@googlegroups.com"
# setup https authentication credentials, used by ./mvnw release:prepare
- git config credential.helper "store --file=.git/credentials"
- echo "https://$GH_TOKEN:@github.com" > .git/credentials

# Override default travis to use the maven wrapper; skip license on travis due to #1512
install: ./mvnw install -DskipTests=true -Dlicense.skip=true -Dmaven.javadoc.skip=true -B -V
script: ./travis/publish.sh

# Don't build release tags. This avoids publish conflicts because the version commit exists both on master and the release tag.
# See https://github.com/travis-ci/travis-ci/issues/1532
branches:
except:
- /^[0-9]/

notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/ead3c37d57527214e9f2
- https://webhooks.gitter.im/e/e57478303f87ecd7bffc
on_success: change
on_failure: always

script:
- mvn test verify -B
env:
global:
# Ex. travis encrypt BINTRAY_USER=your_github_account
- secure: "Xg7ERaJ+8TFkg/lBG6KSKwpQ/Wmw8/TdvyHagphCpGtlp8uAM92igOvXAWvzgnnQxmcPh9Ks0Z5/dJuSVTtxydIqKkac3LXa4AucHe7sxJSHBwFSy0WuWN4Apuvp3uglantjwxc+OEKF9LYI5IgEWW3IS7UD7zvlXPuJ0AjdeP0="
# Ex. travis encrypt BINTRAY_KEY=xxx-https://bintray.com/profile/edit-xxx --add
- secure: "ipXMdXTjN7Ilg+bxjYFXixrBVT5dr/TFKIMH54vCuirrPXkvccCXaMCndk+eN+pprlgjcNBqtb0j/TGAfasdX0jSxOeyAUv5E0hxuXDURZ/OQUEpo7YMjLXrAT1/lg8f343TLJnjujeyuabvMdmFcY9o6HWc+MqB4ZGzNgYNiQo="
# Ex. travis encrypt GH_TOKEN=XXX-https://github.com/settings/tokens-XXX --add
- secure: "PpQs4Eje8IYrCzLBWEv5nc2RL7XPubwhlFps4MO/LUvDg05cJpX4/rj5D0C99O9X9V9RnkDrvDkGxG02dwxZ6E1ciPheL7sGVDYlG75yDNipdSFGErNNH1W1wy4Q4PFbNg0i+vOB7MZas+MyGTZi7aZieX2f/ikVZvieCYoWwh8="
# Ex. travis encrypt SONATYPE_USER=your_sonatype_account
- secure: "Z6aQmONN3znLNtaMdt4ycoyHGdVqSC9W8N3FluZZFFYcoqhtR+p4RMWjpgloQHPZadLLuJIUijQgCYELCAFFkaIcanytIxWnVgK5/qpdfv7Vx52d5mwyCGq3jFtreVRNsd/4g6vkStr4nRf0+dZcDA4Y10CAlsZloF9ETPqQmco="
# Ex. travis encrypt SONATYPE_PASSWORD=your_sonatype_password
- secure: "GY48c/XSiQ87QC7HadzzdXKeymnLYdkwrWliaZzD2djSOv2pgmDMrW05jxIN+81B4w9CcM8R18KsUjpkATWKIctl/+/9sXMlQcvRMdM3EFA66RJA7tg4BjRjRwSv7YQ+935dbCHB/C8Zw05TkUQMpbqtGzjpckGIhNViyOJWYIU="
@@ -1,20 +1,20 @@
# Kafka Interceptor: Zipkin

[![Build Status](https://www.travis-ci.org/sysco-middleware/kafka-interceptor-zipkin.svg?branch=master)](https://www.travis-ci.org/sysco-middleware/kafka-interceptor-zipkin)
[![Build Status](https://www.travis-ci.org/openzipkin-contrib/brave-kafka-interceptor.svg?branch=master)](https://www.travis-ci.org/openzipkin-brave/brave-kafka-interceptor)

Kafka [Consumer](https://kafka.apache.org/0100/javadoc/org/apache/kafka/clients/consumer/ConsumerInterceptor.html)
and
[Producer](https://kafka.apache.org/0100/javadoc/org/apache/kafka/clients/producer/ProducerInterceptor.html)
and
[Producer](https://kafka.apache.org/0100/javadoc/org/apache/kafka/clients/producer/ProducerInterceptor.html)
Interceptor to record tracing data.

This interceptors could be added to Kafka Connectors via configuration and to other off-the-shelf
This interceptors could be added to Kafka Connectors via configuration and to other off-the-shelf
components like Kafka REST Proxy, KSQL and so on.

## Installation

### Producer Interceptor

Producer Interceptor create spans on sending records. This span will only represent the time it took to
Producer Interceptor create spans on 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
@@ -27,7 +27,7 @@ Add Interceptor to Producer Configuration:
### 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.
the `on_consume` method provided by the API, not how long it took to commit, or any other latency.

#### Kafka Clients

@@ -37,15 +37,15 @@ the `on_consume` method provided by the API, not how long it took to commit, or

### Configuration

| Key | Value |
|-------------------------------|---------------------------------------------------------------------------------------|
| `zipkin.sender.type` | Sender type: `NONE`(default), `KAFKA`, `HTTP` |
| 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.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.sampler.rate` | Rate to sample spans. Default: `1.0` |

### How to test it

@@ -66,7 +66,7 @@ Steps to test:

2. Create a table "source_table" with an auto-increment __id__ and __name__ field

3. Once table is created deploy source and sink connectors using Makefile:
3. Once table is created deploy source and sink connectors using Makefile:

```bash
make source-connector
@@ -1,5 +1,5 @@
#
# Copyright 2018-2019 Sysco Middleware
# Copyright 2018-2019 The OpenZipkin Authors
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
# in compliance with the License. You may obtain a copy of the License at
@@ -1,5 +1,5 @@
#
# Copyright 2018-2019 Sysco Middleware
# Copyright 2018-2019 The OpenZipkin Authors
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
# in compliance with the License. You may obtain a copy of the License at
@@ -1,5 +1,5 @@
#
# Copyright 2018-2019 Sysco Middleware
# Copyright 2018-2019 The OpenZipkin Authors
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
# in compliance with the License. You may obtain a copy of the License at

0 comments on commit f58454f

Please sign in to comment.
You can’t perform that action at this time.