https://github.com/hypnoce/java-curator
OpenTracing Instrumentation for Curator framework
https://github.com/hypnoce/java-curator
Last synced: 11 months ago
JSON representation
OpenTracing Instrumentation for Curator framework
- Host: GitHub
- URL: https://github.com/hypnoce/java-curator
- Owner: hypnoce
- License: apache-2.0
- Created: 2018-06-10T13:18:35.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-06-10T16:13:38.000Z (almost 8 years ago)
- Last Synced: 2025-03-14T19:18:11.003Z (about 1 year ago)
- Language: Shell
- Size: 20.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Build Status][ci-img]][ci] [![Coverage Status][cov-img]][cov] [![Released Version][maven-img]][maven]
# opentracing-curator
OpenTracing instrumentation for curator framework
## Installation
pom.xml
```xml
io.opentracing.contrib
opentracing-curator
0.0.1
```
build.gradle
```groovy
compile 'io.opentracing.contrib:opentracing-curator:0.0.1'
```
## Usage
Add the tracing module in your list
```java
CuratorFramework client = ...;
TracerDriver tracerDrivier = new OpentracingCuratorDriver();
client.getZookeeperClient().setTracerDriver(tracerDrivier);
```
Alternatively, you can define the peer service name
```java
CuratorFramework client = ...;
TracerDriver tracerDrivier = new OpentracingCuratorDriver("peerServiceName");
client.getZookeeperClient().setTracerDriver(tracerDrivier);
```
You can find more info on curator [here](https://github.com/apache/curator)
## Tracing tags
The following tags are added to traces :
| Span tag name | Notes |
|:--------------|:-------------------|
| `span.kind` | `client` |
| `component` | `java-curator` |
| `peer.service` | if exists, the peer service name set in `OpentracingCuratorDriver` ctor |
| `error` | `true` if any error occurred. `false` otherwise |
| `session.id` | the zookeeper session id of the current operation |
| `path` | if exists, the zookeeper node on which the operation took place |
[ci-img]: https://travis-ci.org/opentracing-contrib/java-curator.svg?branch=master
[ci]: https://travis-ci.org/opentracing-contrib/java-curator
[cov-img]: https://coveralls.io/repos/github/opentracing-contrib/java-curator/badge.svg?branch=master
[cov]: https://coveralls.io/github/opentracing-contrib/java-curator?branch=master
[maven-img]: https://img.shields.io/maven-central/v/io.opentracing.contrib/opentracing-curator.svg
[maven]: http://search.maven.org/#search%7Cga%7C1%7Copentracing-curator