From 1d67fc9938dd121af693098fcc558a0d87105af8 Mon Sep 17 00:00:00 2001 From: Jay DeLuca Date: Tue, 16 Sep 2025 08:38:48 -0400 Subject: [PATCH 1/3] start readmes --- .../ratpack/ratpack-1.7/library/README.md | 56 +++++++++++++++++++ .../reactor/reactor-3.1/library/README.md | 53 ++++++++++++++++++ .../restlet/restlet-1.1/library/README.md | 55 ++++++++++++++++++ 3 files changed, 164 insertions(+) create mode 100644 instrumentation/ratpack/ratpack-1.7/library/README.md create mode 100644 instrumentation/reactor/reactor-3.1/library/README.md create mode 100644 instrumentation/restlet/restlet-1.1/library/README.md diff --git a/instrumentation/ratpack/ratpack-1.7/library/README.md b/instrumentation/ratpack/ratpack-1.7/library/README.md new file mode 100644 index 000000000000..5437bf25ce16 --- /dev/null +++ b/instrumentation/ratpack/ratpack-1.7/library/README.md @@ -0,0 +1,56 @@ +# Library Instrumentation for Ratpack version 1.7 and higher + +Provides OpenTelemetry instrumentation for [Ratpack](https://ratpack.io/), enabling CLIENT and SERVER spans. + +## Quickstart + +### Add these dependencies to your project + +Replace `OPENTELEMETRY_VERSION` with the [latest release](https://central.sonatype.com/artifact/io.opentelemetry.instrumentation/opentelemetry-ratpack-1.7). + +For Maven, add to your `pom.xml` dependencies: + +```xml + + + io.opentelemetry.instrumentation + opentelemetry-ratpack-1.7 + OPENTELEMETRY_VERSION + + +``` + +For Gradle, add to your dependencies: + +```kotlin +implementation("io.opentelemetry.instrumentation:opentelemetry-ratpack-1.7:OPENTELEMETRY_VERSION") +``` + +### Usage + +```java +import io.opentelemetry.api.OpenTelemetry; +import io.opentelemetry.instrumentation.ratpack.v1_7.RatpackServerTelemetry; +import io.opentelemetry.instrumentation.ratpack.v1_7.RatpackClientTelemetry; +import ratpack.server.RatpackServer; +import ratpack.http.client.HttpClient; + +public class RatpackExample { + public static void main(String[] args) throws Exception { + OpenTelemetry openTelemetry = OpenTelemetry.noop(); + + // Server instrumentation + RatpackServerTelemetry serverTelemetry = RatpackServerTelemetry.create(openTelemetry); + RatpackServer.start(server -> { + server.registryOf(serverTelemetry::configureRegistry); + server.handlers(chain -> + chain.get(ctx -> ctx.render("Hello, World!")) + ); + }); + + // Client instrumentation + RatpackClientTelemetry clientTelemetry = RatpackClientTelemetry.create(openTelemetry); + HttpClient instrumentedHttpClient = clientTelemetry.instrument(HttpClient.of(spec -> {})); + } +} +``` diff --git a/instrumentation/reactor/reactor-3.1/library/README.md b/instrumentation/reactor/reactor-3.1/library/README.md new file mode 100644 index 000000000000..3d5d94fd3843 --- /dev/null +++ b/instrumentation/reactor/reactor-3.1/library/README.md @@ -0,0 +1,53 @@ +# Library Instrumentation for Project Reactor version 3.1 and higher + +Provides OpenTelemetry instrumentation for [Project Reactor](https://projectreactor.io/). + +This instrumentation generates spans for each reactive operation. + +## Quickstart + +### Add these dependencies to your project + +Replace `OPENTELEMETRY_VERSION` with the [latest release](https://central.sonatype.com/artifact/io.opentelemetry.instrumentation/opentelemetry-reactor-3.1). + +For Maven, add to your `pom.xml` dependencies: + +```xml + + + io.opentelemetry.instrumentation + opentelemetry-reactor-3.1 + OPENTELEMETRY_VERSION + + +``` + +For Gradle, add to your dependencies: + +```kotlin +implementation("io.opentelemetry.instrumentation:opentelemetry-reactor-3.1:OPENTELEMETRY_VERSION") +``` + +### Usage + +```java +import io.opentelemetry.api.OpenTelemetry; +import io.opentelemetry.instrumentation.reactor.v3_1.ContextPropagationOperator; +import reactor.core.publisher.Mono; +import reactor.core.publisher.Flux; + +public class ReactorExample { + public static void main(String[] args) { + OpenTelemetry openTelemetry = OpenTelemetry.noop(); + + ContextPropagationOperator contextPropagationOperator = ContextPropagationOperator.create(); + contextPropagationOperator.registerOnEachOperator(); + + Mono mono = Mono.just("Hello, World!"); + Flux flux = Flux.just("Hello", "World"); + + mono.subscribe(System.out::println); + flux.subscribe(System.out::println); + } +} +``` diff --git a/instrumentation/restlet/restlet-1.1/library/README.md b/instrumentation/restlet/restlet-1.1/library/README.md new file mode 100644 index 000000000000..f53ac504fce2 --- /dev/null +++ b/instrumentation/restlet/restlet-1.1/library/README.md @@ -0,0 +1,55 @@ +# Library Instrumentation for Restlet version 1.1 and higher + +Provides OpenTelemetry instrumentation for [Restlet](https://restlet.talend.com/). + +This instrumentation generates SERVER spans for each HTTP request. + +## Quickstart + +### Add these dependencies to your project + +Replace `OPENTELEMETRY_VERSION` with the [latest release](https://central.sonatype.com/artifact/io.opentelemetry.instrumentation/opentelemetry-restlet-1.1). + +For Maven, add to your `pom.xml` dependencies: + +```xml + + + io.opentelemetry.instrumentation + opentelemetry-restlet-1.1 + OPENTELEMETRY_VERSION + + +``` + +For Gradle, add to your dependencies: + +```kotlin +implementation("io.opentelemetry.instrumentation:opentelemetry-restlet-1.1:OPENTELEMETRY_VERSION") +``` + +### Usage + +```java +import io.opentelemetry.api.OpenTelemetry; +import io.opentelemetry.instrumentation.restlet.v1_1.RestletTelemetry; +import org.restlet.Filter; +import org.restlet.Application; +import org.restlet.Restlet; + +public class RestletExample { + public static void main(String[] args) throws Exception { + OpenTelemetry openTelemetry = OpenTelemetry.noop(); + + RestletTelemetry restletTelemetry = RestletTelemetry.create(openTelemetry); + Filter tracingFilter = restletTelemetry.newFilter("/api"); + + Application application = new Application() { + @Override + public Restlet createInboundRoot() { + return tracingFilter; + } + }; + } +} +``` From 5ff910b79ea6b33a1cf121d401c399be8666b1b8 Mon Sep 17 00:00:00 2001 From: Jay DeLuca Date: Tue, 16 Sep 2025 09:18:40 -0400 Subject: [PATCH 2/3] Update more --- .../ratpack/ratpack-1.7/library/README.md | 6 +- .../reactor/reactor-3.1/library/README.md | 7 +- .../restlet/restlet-1.1/library/README.md | 8 +-- .../restlet/restlet-2.0/library/README.md | 55 +++++++++++++++ .../rxjava/rxjava-1.0/library/README.md | 67 +++++++++++++++++++ .../rxjava/rxjava-2.0/library/README.md | 54 +++++++++++++++ .../rxjava/rxjava-3.1.1/library/README.md | 54 +++++++++++++++ 7 files changed, 240 insertions(+), 11 deletions(-) create mode 100644 instrumentation/restlet/restlet-2.0/library/README.md create mode 100644 instrumentation/rxjava/rxjava-1.0/library/README.md create mode 100644 instrumentation/rxjava/rxjava-2.0/library/README.md create mode 100644 instrumentation/rxjava/rxjava-3.1.1/library/README.md diff --git a/instrumentation/ratpack/ratpack-1.7/library/README.md b/instrumentation/ratpack/ratpack-1.7/library/README.md index 5437bf25ce16..393c61cfc73b 100644 --- a/instrumentation/ratpack/ratpack-1.7/library/README.md +++ b/instrumentation/ratpack/ratpack-1.7/library/README.md @@ -1,6 +1,7 @@ # Library Instrumentation for Ratpack version 1.7 and higher -Provides OpenTelemetry instrumentation for [Ratpack](https://ratpack.io/), enabling CLIENT and SERVER spans. +Provides OpenTelemetry instrumentation for [Ratpack](https://ratpack.io/), enabling HTTP client and server spans and +metrics. ## Quickstart @@ -37,7 +38,8 @@ import ratpack.http.client.HttpClient; public class RatpackExample { public static void main(String[] args) throws Exception { - OpenTelemetry openTelemetry = OpenTelemetry.noop(); + // Get an OpenTelemetry instance + OpenTelemetry openTelemetry = ...; // Server instrumentation RatpackServerTelemetry serverTelemetry = RatpackServerTelemetry.create(openTelemetry); diff --git a/instrumentation/reactor/reactor-3.1/library/README.md b/instrumentation/reactor/reactor-3.1/library/README.md index 3d5d94fd3843..a1346b2f29ad 100644 --- a/instrumentation/reactor/reactor-3.1/library/README.md +++ b/instrumentation/reactor/reactor-3.1/library/README.md @@ -1,8 +1,7 @@ # Library Instrumentation for Project Reactor version 3.1 and higher -Provides OpenTelemetry instrumentation for [Project Reactor](https://projectreactor.io/). - -This instrumentation generates spans for each reactive operation. +Provides OpenTelemetry instrumentation for [Project Reactor](https://projectreactor.io/), enabling +context propagation through Reactor's execution model. ## Quickstart @@ -38,8 +37,6 @@ import reactor.core.publisher.Flux; public class ReactorExample { public static void main(String[] args) { - OpenTelemetry openTelemetry = OpenTelemetry.noop(); - ContextPropagationOperator contextPropagationOperator = ContextPropagationOperator.create(); contextPropagationOperator.registerOnEachOperator(); diff --git a/instrumentation/restlet/restlet-1.1/library/README.md b/instrumentation/restlet/restlet-1.1/library/README.md index f53ac504fce2..b3e161dd8a91 100644 --- a/instrumentation/restlet/restlet-1.1/library/README.md +++ b/instrumentation/restlet/restlet-1.1/library/README.md @@ -1,8 +1,7 @@ # Library Instrumentation for Restlet version 1.1 and higher -Provides OpenTelemetry instrumentation for [Restlet](https://restlet.talend.com/). - -This instrumentation generates SERVER spans for each HTTP request. +Provides OpenTelemetry instrumentation for [Restlet](https://restlet.talend.com/), enabling HTTP +server spans. ## Quickstart @@ -39,7 +38,8 @@ import org.restlet.Restlet; public class RestletExample { public static void main(String[] args) throws Exception { - OpenTelemetry openTelemetry = OpenTelemetry.noop(); + // Get an OpenTelemetry instance + OpenTelemetry openTelemetry = ...; RestletTelemetry restletTelemetry = RestletTelemetry.create(openTelemetry); Filter tracingFilter = restletTelemetry.newFilter("/api"); diff --git a/instrumentation/restlet/restlet-2.0/library/README.md b/instrumentation/restlet/restlet-2.0/library/README.md new file mode 100644 index 000000000000..128a44aac142 --- /dev/null +++ b/instrumentation/restlet/restlet-2.0/library/README.md @@ -0,0 +1,55 @@ +# Library Instrumentation for Restlet version 2.0 and higher + +Provides OpenTelemetry instrumentation for [Restlet](https://restlet.talend.com/), enabling HTTP +server spans. + +## Quickstart + +### Add these dependencies to your project + +Replace `OPENTELEMETRY_VERSION` with the [latest release](https://central.sonatype.com/artifact/io.opentelemetry.instrumentation/opentelemetry-restlet-2.0). + +For Maven, add to your `pom.xml` dependencies: + +```xml + + + io.opentelemetry.instrumentation + opentelemetry-restlet-2.0 + OPENTELEMETRY_VERSION + + +``` + +For Gradle, add to your dependencies: + +```kotlin +implementation("io.opentelemetry.instrumentation:opentelemetry-restlet-2.0:OPENTELEMETRY_VERSION") +``` + +### Usage + +```java +import io.opentelemetry.api.OpenTelemetry; +import io.opentelemetry.instrumentation.restlet.v2_0.RestletTelemetry; +import org.restlet.Application; +import org.restlet.Restlet; +import org.restlet.routing.Filter; + +public class RestletExample { + public static void main(String[] args) throws Exception { + // Get an OpenTelemetry instance + OpenTelemetry openTelemetry = ...; + + RestletTelemetry restletTelemetry = RestletTelemetry.create(openTelemetry); + Filter tracingFilter = restletTelemetry.newFilter("/api"); + + Application application = new Application() { + @Override + public Restlet createInboundRoot() { + return tracingFilter; + } + }; + } +} +``` diff --git a/instrumentation/rxjava/rxjava-1.0/library/README.md b/instrumentation/rxjava/rxjava-1.0/library/README.md new file mode 100644 index 000000000000..a8791141130e --- /dev/null +++ b/instrumentation/rxjava/rxjava-1.0/library/README.md @@ -0,0 +1,67 @@ +# Library Instrumentation for RxJava version 1.0 and higher + +Provides OpenTelemetry instrumentation utilities for [RxJava](https://github.com/ReactiveX/RxJava/tree/1.x), +enabling context propagation through RxJava's execution model. + +**Note**: This library is primarily designed for use by other OpenTelemetry instrumentation +libraries and framework integrations, not for direct end-user application usage. + +## Quickstart + +### Add these dependencies to your project + +Replace `OPENTELEMETRY_VERSION` with the [latest release](https://central.sonatype.com/artifact/io.opentelemetry.instrumentation/opentelemetry-rxjava-1.0). + +For Maven, add to your `pom.xml` dependencies: + +```xml + + + io.opentelemetry.instrumentation + opentelemetry-rxjava-1.0 + OPENTELEMETRY_VERSION + + +``` + +For Gradle, add to your dependencies: + +```kotlin +implementation("io.opentelemetry.instrumentation:opentelemetry-rxjava-1.0:OPENTELEMETRY_VERSION") +``` + +### Usage + +This library provides the `TracedOnSubscribe` class for instrumenting RxJava Observables with +OpenTelemetry spans: + +```java +import io.opentelemetry.api.OpenTelemetry; +import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter; +import io.opentelemetry.instrumentation.rxjava.v1_0.TracedOnSubscribe; +import rx.Observable; + +public class RxJavaExample { + public static void main(String[] args) { + // Get an OpenTelemetry instance + OpenTelemetry openTelemetry = ...; + + // Create an instrumenter for your specific request type + Instrumenter instrumenter = Instrumenter.builder( + openTelemetry, + "instrumentation-name", + request -> "operation-name") + .buildInstrumenter(); + + // Create a regular Observable + Observable originalObservable = Observable.just("Hello", "World"); + + // Wrap it with tracing + Observable tracedObservable = Observable.create( + new TracedOnSubscribe<>(originalObservable, instrumenter, "request-context")); + + // Subscribe to the traced observable + tracedObservable.subscribe(System.out::println); + } +} +``` diff --git a/instrumentation/rxjava/rxjava-2.0/library/README.md b/instrumentation/rxjava/rxjava-2.0/library/README.md new file mode 100644 index 000000000000..b7a9eb643d91 --- /dev/null +++ b/instrumentation/rxjava/rxjava-2.0/library/README.md @@ -0,0 +1,54 @@ +# Library Instrumentation for RxJava version 2.0 and higher + +Provides OpenTelemetry instrumentation for [RxJava](https://github.com/ReactiveX/RxJava), enabling +context propagation through RxJava's execution model. + +## Quickstart + +### Add these dependencies to your project + +Replace `OPENTELEMETRY_VERSION` with the [latest release](https://central.sonatype.com/artifact/io.opentelemetry.instrumentation/opentelemetry-rxjava-2.0). + +For Maven, add to your `pom.xml` dependencies: + +```xml + + + io.opentelemetry.instrumentation + opentelemetry-rxjava-2.0 + OPENTELEMETRY_VERSION + + +``` + +For Gradle, add to your dependencies: + +```kotlin +implementation("io.opentelemetry.instrumentation:opentelemetry-rxjava-2.0:OPENTELEMETRY_VERSION") +``` + +### Usage + +Enable RxJava instrumentation by calling `TracingAssembly.enable()` once during application startup. +This will automatically instrument all RxJava operations in your application: + +```java +import io.opentelemetry.instrumentation.rxjava.v2_0.TracingAssembly; +import io.reactivex.Observable; +import io.reactivex.Flowable; + +public class RxJavaExample { + public static void main(String[] args) { + // Enable RxJava instrumentation globally + TracingAssembly tracingAssembly = TracingAssembly.create(); + tracingAssembly.enable(); + + // All RxJava operations will now be automatically instrumented + Observable observable = Observable.just("Hello", "World"); + Flowable flowable = Flowable.just("Hello", "World"); + + observable.subscribe(System.out::println); + flowable.subscribe(System.out::println); + } +} +``` diff --git a/instrumentation/rxjava/rxjava-3.1.1/library/README.md b/instrumentation/rxjava/rxjava-3.1.1/library/README.md new file mode 100644 index 000000000000..c51e7845826e --- /dev/null +++ b/instrumentation/rxjava/rxjava-3.1.1/library/README.md @@ -0,0 +1,54 @@ +# Library Instrumentation for RxJava version 3.1.1 and higher + +Provides OpenTelemetry instrumentation for [RxJava](https://github.com/ReactiveX/RxJava), enabling +context propagation through RxJava's execution model. + +## Quickstart + +### Add these dependencies to your project + +Replace `OPENTELEMETRY_VERSION` with the [latest release](https://central.sonatype.com/artifact/io.opentelemetry.instrumentation/opentelemetry-rxjava-3.1.1). + +For Maven, add to your `pom.xml` dependencies: + +```xml + + + io.opentelemetry.instrumentation + opentelemetry-rxjava-3.1.1 + OPENTELEMETRY_VERSION + + +``` + +For Gradle, add to your dependencies: + +```kotlin +implementation("io.opentelemetry.instrumentation:opentelemetry-rxjava-3.1.1:OPENTELEMETRY_VERSION") +``` + +### Usage + +Enable RxJava instrumentation by calling `TracingAssembly.enable()` once during application startup. +This will automatically instrument all RxJava operations in your application: + +```java +import io.opentelemetry.instrumentation.rxjava.v3_1_1.TracingAssembly; +import io.reactivex.rxjava3.core.Observable; +import io.reactivex.rxjava3.core.Flowable; + +public class RxJavaExample { + public static void main(String[] args) { + // Enable RxJava instrumentation globally + TracingAssembly tracingAssembly = TracingAssembly.create(); + tracingAssembly.enable(); + + // All RxJava operations will now be automatically instrumented + Observable observable = Observable.just("Hello", "World"); + Flowable flowable = Flowable.just("Hello", "World"); + + observable.subscribe(System.out::println); + flowable.subscribe(System.out::println); + } +} +``` From d6c98e77481b4025f4252566fe2f215780f039cc Mon Sep 17 00:00:00 2001 From: Jay DeLuca Date: Fri, 19 Sep 2025 13:05:39 -0400 Subject: [PATCH 3/3] code review updates --- .../ratpack/ratpack-1.7/library/README.md | 28 +++++--- .../reactor/reactor-3.1/library/README.md | 4 +- .../rxjava/rxjava-1.0/library/README.md | 67 ------------------- .../rxjava/rxjava-1.0/metadata.yaml | 1 + .../rxjava/rxjava-2.0/library/README.md | 4 +- .../rxjava/rxjava-3.1.1/library/README.md | 4 +- 6 files changed, 22 insertions(+), 86 deletions(-) delete mode 100644 instrumentation/rxjava/rxjava-1.0/library/README.md create mode 100644 instrumentation/rxjava/rxjava-1.0/metadata.yaml diff --git a/instrumentation/ratpack/ratpack-1.7/library/README.md b/instrumentation/ratpack/ratpack-1.7/library/README.md index 393c61cfc73b..179cc9c8a9a2 100644 --- a/instrumentation/ratpack/ratpack-1.7/library/README.md +++ b/instrumentation/ratpack/ratpack-1.7/library/README.md @@ -1,7 +1,7 @@ # Library Instrumentation for Ratpack version 1.7 and higher -Provides OpenTelemetry instrumentation for [Ratpack](https://ratpack.io/), enabling HTTP client and server spans and -metrics. +Provides OpenTelemetry instrumentation for [Ratpack](https://ratpack.io/), enabling HTTP client and +server spans and metrics. ## Quickstart @@ -29,6 +29,9 @@ implementation("io.opentelemetry.instrumentation:opentelemetry-ratpack-1.7:OPENT ### Usage +The instrumentation library provides implementations for both server and client instrumentation +that wrap Ratpack components. + ```java import io.opentelemetry.api.OpenTelemetry; import io.opentelemetry.instrumentation.ratpack.v1_7.RatpackServerTelemetry; @@ -36,23 +39,28 @@ import io.opentelemetry.instrumentation.ratpack.v1_7.RatpackClientTelemetry; import ratpack.server.RatpackServer; import ratpack.http.client.HttpClient; -public class RatpackExample { - public static void main(String[] args) throws Exception { - // Get an OpenTelemetry instance - OpenTelemetry openTelemetry = ...; +public class RatpackConfiguration { - // Server instrumentation + // Create a server with OpenTelemetry instrumentation + public RatpackServer createTracedServer(OpenTelemetry openTelemetry) throws Exception { RatpackServerTelemetry serverTelemetry = RatpackServerTelemetry.create(openTelemetry); - RatpackServer.start(server -> { + return RatpackServer.start(server -> { server.registryOf(serverTelemetry::configureRegistry); server.handlers(chain -> chain.get(ctx -> ctx.render("Hello, World!")) ); }); + } - // Client instrumentation + // Create an instrumented HttpClient + public HttpClient createTracedClient(OpenTelemetry openTelemetry) { RatpackClientTelemetry clientTelemetry = RatpackClientTelemetry.create(openTelemetry); - HttpClient instrumentedHttpClient = clientTelemetry.instrument(HttpClient.of(spec -> {})); + return clientTelemetry.instrument(createClient()); + } + + // Configuration of the HttpClient goes here + private HttpClient createClient() { + return HttpClient.of(spec -> {}); } } ``` diff --git a/instrumentation/reactor/reactor-3.1/library/README.md b/instrumentation/reactor/reactor-3.1/library/README.md index a1346b2f29ad..200a2164286e 100644 --- a/instrumentation/reactor/reactor-3.1/library/README.md +++ b/instrumentation/reactor/reactor-3.1/library/README.md @@ -42,9 +42,7 @@ public class ReactorExample { Mono mono = Mono.just("Hello, World!"); Flux flux = Flux.just("Hello", "World"); - - mono.subscribe(System.out::println); - flux.subscribe(System.out::println); + ... } } ``` diff --git a/instrumentation/rxjava/rxjava-1.0/library/README.md b/instrumentation/rxjava/rxjava-1.0/library/README.md deleted file mode 100644 index a8791141130e..000000000000 --- a/instrumentation/rxjava/rxjava-1.0/library/README.md +++ /dev/null @@ -1,67 +0,0 @@ -# Library Instrumentation for RxJava version 1.0 and higher - -Provides OpenTelemetry instrumentation utilities for [RxJava](https://github.com/ReactiveX/RxJava/tree/1.x), -enabling context propagation through RxJava's execution model. - -**Note**: This library is primarily designed for use by other OpenTelemetry instrumentation -libraries and framework integrations, not for direct end-user application usage. - -## Quickstart - -### Add these dependencies to your project - -Replace `OPENTELEMETRY_VERSION` with the [latest release](https://central.sonatype.com/artifact/io.opentelemetry.instrumentation/opentelemetry-rxjava-1.0). - -For Maven, add to your `pom.xml` dependencies: - -```xml - - - io.opentelemetry.instrumentation - opentelemetry-rxjava-1.0 - OPENTELEMETRY_VERSION - - -``` - -For Gradle, add to your dependencies: - -```kotlin -implementation("io.opentelemetry.instrumentation:opentelemetry-rxjava-1.0:OPENTELEMETRY_VERSION") -``` - -### Usage - -This library provides the `TracedOnSubscribe` class for instrumenting RxJava Observables with -OpenTelemetry spans: - -```java -import io.opentelemetry.api.OpenTelemetry; -import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter; -import io.opentelemetry.instrumentation.rxjava.v1_0.TracedOnSubscribe; -import rx.Observable; - -public class RxJavaExample { - public static void main(String[] args) { - // Get an OpenTelemetry instance - OpenTelemetry openTelemetry = ...; - - // Create an instrumenter for your specific request type - Instrumenter instrumenter = Instrumenter.builder( - openTelemetry, - "instrumentation-name", - request -> "operation-name") - .buildInstrumenter(); - - // Create a regular Observable - Observable originalObservable = Observable.just("Hello", "World"); - - // Wrap it with tracing - Observable tracedObservable = Observable.create( - new TracedOnSubscribe<>(originalObservable, instrumenter, "request-context")); - - // Subscribe to the traced observable - tracedObservable.subscribe(System.out::println); - } -} -``` diff --git a/instrumentation/rxjava/rxjava-1.0/metadata.yaml b/instrumentation/rxjava/rxjava-1.0/metadata.yaml new file mode 100644 index 000000000000..5a03ece2f748 --- /dev/null +++ b/instrumentation/rxjava/rxjava-1.0/metadata.yaml @@ -0,0 +1 @@ +classification: internal diff --git a/instrumentation/rxjava/rxjava-2.0/library/README.md b/instrumentation/rxjava/rxjava-2.0/library/README.md index b7a9eb643d91..c5be4ad69339 100644 --- a/instrumentation/rxjava/rxjava-2.0/library/README.md +++ b/instrumentation/rxjava/rxjava-2.0/library/README.md @@ -46,9 +46,7 @@ public class RxJavaExample { // All RxJava operations will now be automatically instrumented Observable observable = Observable.just("Hello", "World"); Flowable flowable = Flowable.just("Hello", "World"); - - observable.subscribe(System.out::println); - flowable.subscribe(System.out::println); + ... } } ``` diff --git a/instrumentation/rxjava/rxjava-3.1.1/library/README.md b/instrumentation/rxjava/rxjava-3.1.1/library/README.md index c51e7845826e..0a9ad5e7210a 100644 --- a/instrumentation/rxjava/rxjava-3.1.1/library/README.md +++ b/instrumentation/rxjava/rxjava-3.1.1/library/README.md @@ -46,9 +46,7 @@ public class RxJavaExample { // All RxJava operations will now be automatically instrumented Observable observable = Observable.just("Hello", "World"); Flowable flowable = Flowable.just("Hello", "World"); - - observable.subscribe(System.out::println); - flowable.subscribe(System.out::println); + ... } } ```