io.opentracing.contrib:opentracing-rxjava-parent

OpenTracing Instrumentation for RxJava

License

License

Categories

Categories

RxJava Container Microservices Reactive libraries
GroupId

GroupId

io.opentracing.contrib
ArtifactId

ArtifactId

opentracing-rxjava-parent
Last Version

Last Version

0.1.4
Release Date

Release Date

Type

Type

pom
Description

Description

io.opentracing.contrib:opentracing-rxjava-parent
OpenTracing Instrumentation for RxJava
Project URL

Project URL

https://github.com/opentracing-contrib/java-rxjava
Source Code Management

Source Code Management

http://github.com/opentracing-contrib/java-rxjava

Download opentracing-rxjava-parent

How to add to project

<!-- https://jarcasting.com/artifacts/io.opentracing.contrib/opentracing-rxjava-parent/ -->
<dependency>
    <groupId>io.opentracing.contrib</groupId>
    <artifactId>opentracing-rxjava-parent</artifactId>
    <version>0.1.4</version>
    <type>pom</type>
</dependency>
// https://jarcasting.com/artifacts/io.opentracing.contrib/opentracing-rxjava-parent/
implementation 'io.opentracing.contrib:opentracing-rxjava-parent:0.1.4'
// https://jarcasting.com/artifacts/io.opentracing.contrib/opentracing-rxjava-parent/
implementation ("io.opentracing.contrib:opentracing-rxjava-parent:0.1.4")
'io.opentracing.contrib:opentracing-rxjava-parent:pom:0.1.4'
<dependency org="io.opentracing.contrib" name="opentracing-rxjava-parent" rev="0.1.4">
  <artifact name="opentracing-rxjava-parent" type="pom" />
</dependency>
@Grapes(
@Grab(group='io.opentracing.contrib', module='opentracing-rxjava-parent', version='0.1.4')
)
libraryDependencies += "io.opentracing.contrib" % "opentracing-rxjava-parent" % "0.1.4"
[io.opentracing.contrib/opentracing-rxjava-parent "0.1.4"]

Dependencies

compile (1)

Group / Artifact Type Version
io.opentracing : opentracing-util jar 0.33.0

test (3)

Group / Artifact Type Version
io.opentracing : opentracing-mock jar 0.33.0
org.awaitility : awaitility jar 4.0.2
junit : junit jar 4.13

Project Modules

  • opentracing-rxjava-1
  • opentracing-rxjava-2
  • opentracing-rxjava-3

Build Status Coverage Status Released Version Apache-2.0 license

OpenTracing RxJava Instrumentation

OpenTracing instrumentation for RxJava.

Installation

RxJava 1

pom.xml

<dependency>
    <groupId>io.opentracing.contrib</groupId>
    <artifactId>opentracing-rxjava-1</artifactId>
    <version>VERSION</version>
</dependency>

RxJava 2

pom.xml

<dependency>
    <groupId>io.opentracing.contrib</groupId>
    <artifactId>opentracing-rxjava-2</artifactId>
    <version>VERSION</version>
</dependency>

RxJava 3

pom.xml

<dependency>
    <groupId>io.opentracing.contrib</groupId>
    <artifactId>opentracing-rxjava-3</artifactId>
    <version>VERSION</version>
</dependency>

Usage

// Instantiate tracer
Tracer tracer = ...

// Optionally register tracer with GlobalTracer
GlobalTracer.register(tracer);

RxJava 1

// Enable Tracing via TracingRxJavaUtils
TracingRxJavaUtils.enableTracing(tracer);

Subscriber

// Decorate RxJava Subscriber  with TracingSubscriber
Subscriber<Integer> subscriber = ...
Subscriber<Integer> tracingSubscriber = new TracingSubscriber<>(subscriber, "subscriber", tracer);

// Subscribe Observable to TracingSubscriber
observable.subscribe(tracingSubscriber);

Action

// Decorate RxJava Action with TracingActionSubscriber
Action1<Integer> onNext = ...
TracingActionSubscriber<Integer> tracingSubscriber = new TracingActionSubscriber<>(onNext,
        "action", tracer);

// Subscribe Observable to TracingActionSubscriber
observable.subscribe(tracingSubscriber);

Observer

// Decorate RxJava Observer with TracingObserverSubscriber
Observer<Integer> observer = ...
TracingObserverSubscriber<Integer> tracingSubscriber = new TracingObserverSubscriber(observer, 
        "observer", tracer);

//  Subscribe Observable to TracingObserverSubscriber
observable.subscribe(tracingSubscriber);

RxJava 2 / RxJava 3

// Enable Tracing via TracingRxJava2Utils

// For RxJava 2:
TracingRxJava2Utils.enableTracing(tracer);

// For RxJava 3:
TracingRxJava3Utils.enableTracing(tracer);

Observer

// Decorate RxJava Observer with TracingObserver
Observer<Integer> observer = ...
Observer<Integer> tracingObserver = new TracingObserver<>(observer, "observer", tracer);

// Subscribe Observable to TracingObserver
observable.subscribe(tracingObserver);

Consumer

// Decorate RxJava Consumer with TracingConsumer
Consumer<Integer> onNext = ...
TracingConsumer<Integer> tracingConsumer = new TracingConsumer(onNext, "consumer", tracer);

// Subscribe Observable to TracingConsumer
observable.subscribe(tracingConsumer);

License

Apache 2.0 License.

io.opentracing.contrib

3rd-Party OpenTracing API Contributions

3rd-party contributions that use OpenTracing. **The repositories in this org are *not* affiliated with the CNCF.**

Versions

Version
0.1.4
0.1.3
0.1.2
0.1.1
0.1.0
0.0.9
0.0.8
0.0.7
0.0.6
0.0.5
0.0.4
0.0.3
0.0.2
0.0.1