OpenTracing Instrumentation for RxJava 1


License

License

Categories

Categories

RxJava Container Microservices Reactive libraries
GroupId

GroupId

io.opentracing.contrib
ArtifactId

ArtifactId

opentracing-rxjava-1
Last Version

Last Version

0.1.4
Release Date

Release Date

Type

Type

jar
Description

Description

OpenTracing Instrumentation for RxJava 1
OpenTracing Instrumentation for RxJava 1

Download opentracing-rxjava-1

How to add to project

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

Dependencies

compile (1)

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

provided (1)

Group / Artifact Type Version
io.reactivex : rxjava jar 1.3.8

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

There are no modules declared in this project.

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