Skip to content

Commit 5ff910b

Browse files
committed
Update more
1 parent 1d67fc9 commit 5ff910b

File tree

7 files changed

+240
-11
lines changed

7 files changed

+240
-11
lines changed

instrumentation/ratpack/ratpack-1.7/library/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Library Instrumentation for Ratpack version 1.7 and higher
22

3-
Provides OpenTelemetry instrumentation for [Ratpack](https://ratpack.io/), enabling CLIENT and SERVER spans.
3+
Provides OpenTelemetry instrumentation for [Ratpack](https://ratpack.io/), enabling HTTP client and server spans and
4+
metrics.
45

56
## Quickstart
67

@@ -37,7 +38,8 @@ import ratpack.http.client.HttpClient;
3738

3839
public class RatpackExample {
3940
public static void main(String[] args) throws Exception {
40-
OpenTelemetry openTelemetry = OpenTelemetry.noop();
41+
// Get an OpenTelemetry instance
42+
OpenTelemetry openTelemetry = ...;
4143

4244
// Server instrumentation
4345
RatpackServerTelemetry serverTelemetry = RatpackServerTelemetry.create(openTelemetry);

instrumentation/reactor/reactor-3.1/library/README.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
# Library Instrumentation for Project Reactor version 3.1 and higher
22

3-
Provides OpenTelemetry instrumentation for [Project Reactor](https://projectreactor.io/).
4-
5-
This instrumentation generates spans for each reactive operation.
3+
Provides OpenTelemetry instrumentation for [Project Reactor](https://projectreactor.io/), enabling
4+
context propagation through Reactor's execution model.
65

76
## Quickstart
87

@@ -38,8 +37,6 @@ import reactor.core.publisher.Flux;
3837

3938
public class ReactorExample {
4039
public static void main(String[] args) {
41-
OpenTelemetry openTelemetry = OpenTelemetry.noop();
42-
4340
ContextPropagationOperator contextPropagationOperator = ContextPropagationOperator.create();
4441
contextPropagationOperator.registerOnEachOperator();
4542

instrumentation/restlet/restlet-1.1/library/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
# Library Instrumentation for Restlet version 1.1 and higher
22

3-
Provides OpenTelemetry instrumentation for [Restlet](https://restlet.talend.com/).
4-
5-
This instrumentation generates SERVER spans for each HTTP request.
3+
Provides OpenTelemetry instrumentation for [Restlet](https://restlet.talend.com/), enabling HTTP
4+
server spans.
65

76
## Quickstart
87

@@ -39,7 +38,8 @@ import org.restlet.Restlet;
3938

4039
public class RestletExample {
4140
public static void main(String[] args) throws Exception {
42-
OpenTelemetry openTelemetry = OpenTelemetry.noop();
41+
// Get an OpenTelemetry instance
42+
OpenTelemetry openTelemetry = ...;
4343

4444
RestletTelemetry restletTelemetry = RestletTelemetry.create(openTelemetry);
4545
Filter tracingFilter = restletTelemetry.newFilter("/api");
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Library Instrumentation for Restlet version 2.0 and higher
2+
3+
Provides OpenTelemetry instrumentation for [Restlet](https://restlet.talend.com/), enabling HTTP
4+
server spans.
5+
6+
## Quickstart
7+
8+
### Add these dependencies to your project
9+
10+
Replace `OPENTELEMETRY_VERSION` with the [latest release](https://central.sonatype.com/artifact/io.opentelemetry.instrumentation/opentelemetry-restlet-2.0).
11+
12+
For Maven, add to your `pom.xml` dependencies:
13+
14+
```xml
15+
<dependencies>
16+
<dependency>
17+
<groupId>io.opentelemetry.instrumentation</groupId>
18+
<artifactId>opentelemetry-restlet-2.0</artifactId>
19+
<version>OPENTELEMETRY_VERSION</version>
20+
</dependency>
21+
</dependencies>
22+
```
23+
24+
For Gradle, add to your dependencies:
25+
26+
```kotlin
27+
implementation("io.opentelemetry.instrumentation:opentelemetry-restlet-2.0:OPENTELEMETRY_VERSION")
28+
```
29+
30+
### Usage
31+
32+
```java
33+
import io.opentelemetry.api.OpenTelemetry;
34+
import io.opentelemetry.instrumentation.restlet.v2_0.RestletTelemetry;
35+
import org.restlet.Application;
36+
import org.restlet.Restlet;
37+
import org.restlet.routing.Filter;
38+
39+
public class RestletExample {
40+
public static void main(String[] args) throws Exception {
41+
// Get an OpenTelemetry instance
42+
OpenTelemetry openTelemetry = ...;
43+
44+
RestletTelemetry restletTelemetry = RestletTelemetry.create(openTelemetry);
45+
Filter tracingFilter = restletTelemetry.newFilter("/api");
46+
47+
Application application = new Application() {
48+
@Override
49+
public Restlet createInboundRoot() {
50+
return tracingFilter;
51+
}
52+
};
53+
}
54+
}
55+
```
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Library Instrumentation for RxJava version 1.0 and higher
2+
3+
Provides OpenTelemetry instrumentation utilities for [RxJava](https://github.com/ReactiveX/RxJava/tree/1.x),
4+
enabling context propagation through RxJava's execution model.
5+
6+
**Note**: This library is primarily designed for use by other OpenTelemetry instrumentation
7+
libraries and framework integrations, not for direct end-user application usage.
8+
9+
## Quickstart
10+
11+
### Add these dependencies to your project
12+
13+
Replace `OPENTELEMETRY_VERSION` with the [latest release](https://central.sonatype.com/artifact/io.opentelemetry.instrumentation/opentelemetry-rxjava-1.0).
14+
15+
For Maven, add to your `pom.xml` dependencies:
16+
17+
```xml
18+
<dependencies>
19+
<dependency>
20+
<groupId>io.opentelemetry.instrumentation</groupId>
21+
<artifactId>opentelemetry-rxjava-1.0</artifactId>
22+
<version>OPENTELEMETRY_VERSION</version>
23+
</dependency>
24+
</dependencies>
25+
```
26+
27+
For Gradle, add to your dependencies:
28+
29+
```kotlin
30+
implementation("io.opentelemetry.instrumentation:opentelemetry-rxjava-1.0:OPENTELEMETRY_VERSION")
31+
```
32+
33+
### Usage
34+
35+
This library provides the `TracedOnSubscribe` class for instrumenting RxJava Observables with
36+
OpenTelemetry spans:
37+
38+
```java
39+
import io.opentelemetry.api.OpenTelemetry;
40+
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
41+
import io.opentelemetry.instrumentation.rxjava.v1_0.TracedOnSubscribe;
42+
import rx.Observable;
43+
44+
public class RxJavaExample {
45+
public static void main(String[] args) {
46+
// Get an OpenTelemetry instance
47+
OpenTelemetry openTelemetry = ...;
48+
49+
// Create an instrumenter for your specific request type
50+
Instrumenter<String, Void> instrumenter = Instrumenter.<String, Void>builder(
51+
openTelemetry,
52+
"instrumentation-name",
53+
request -> "operation-name")
54+
.buildInstrumenter();
55+
56+
// Create a regular Observable
57+
Observable<String> originalObservable = Observable.just("Hello", "World");
58+
59+
// Wrap it with tracing
60+
Observable<String> tracedObservable = Observable.create(
61+
new TracedOnSubscribe<>(originalObservable, instrumenter, "request-context"));
62+
63+
// Subscribe to the traced observable
64+
tracedObservable.subscribe(System.out::println);
65+
}
66+
}
67+
```
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Library Instrumentation for RxJava version 2.0 and higher
2+
3+
Provides OpenTelemetry instrumentation for [RxJava](https://github.com/ReactiveX/RxJava), enabling
4+
context propagation through RxJava's execution model.
5+
6+
## Quickstart
7+
8+
### Add these dependencies to your project
9+
10+
Replace `OPENTELEMETRY_VERSION` with the [latest release](https://central.sonatype.com/artifact/io.opentelemetry.instrumentation/opentelemetry-rxjava-2.0).
11+
12+
For Maven, add to your `pom.xml` dependencies:
13+
14+
```xml
15+
<dependencies>
16+
<dependency>
17+
<groupId>io.opentelemetry.instrumentation</groupId>
18+
<artifactId>opentelemetry-rxjava-2.0</artifactId>
19+
<version>OPENTELEMETRY_VERSION</version>
20+
</dependency>
21+
</dependencies>
22+
```
23+
24+
For Gradle, add to your dependencies:
25+
26+
```kotlin
27+
implementation("io.opentelemetry.instrumentation:opentelemetry-rxjava-2.0:OPENTELEMETRY_VERSION")
28+
```
29+
30+
### Usage
31+
32+
Enable RxJava instrumentation by calling `TracingAssembly.enable()` once during application startup.
33+
This will automatically instrument all RxJava operations in your application:
34+
35+
```java
36+
import io.opentelemetry.instrumentation.rxjava.v2_0.TracingAssembly;
37+
import io.reactivex.Observable;
38+
import io.reactivex.Flowable;
39+
40+
public class RxJavaExample {
41+
public static void main(String[] args) {
42+
// Enable RxJava instrumentation globally
43+
TracingAssembly tracingAssembly = TracingAssembly.create();
44+
tracingAssembly.enable();
45+
46+
// All RxJava operations will now be automatically instrumented
47+
Observable<String> observable = Observable.just("Hello", "World");
48+
Flowable<String> flowable = Flowable.just("Hello", "World");
49+
50+
observable.subscribe(System.out::println);
51+
flowable.subscribe(System.out::println);
52+
}
53+
}
54+
```
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Library Instrumentation for RxJava version 3.1.1 and higher
2+
3+
Provides OpenTelemetry instrumentation for [RxJava](https://github.com/ReactiveX/RxJava), enabling
4+
context propagation through RxJava's execution model.
5+
6+
## Quickstart
7+
8+
### Add these dependencies to your project
9+
10+
Replace `OPENTELEMETRY_VERSION` with the [latest release](https://central.sonatype.com/artifact/io.opentelemetry.instrumentation/opentelemetry-rxjava-3.1.1).
11+
12+
For Maven, add to your `pom.xml` dependencies:
13+
14+
```xml
15+
<dependencies>
16+
<dependency>
17+
<groupId>io.opentelemetry.instrumentation</groupId>
18+
<artifactId>opentelemetry-rxjava-3.1.1</artifactId>
19+
<version>OPENTELEMETRY_VERSION</version>
20+
</dependency>
21+
</dependencies>
22+
```
23+
24+
For Gradle, add to your dependencies:
25+
26+
```kotlin
27+
implementation("io.opentelemetry.instrumentation:opentelemetry-rxjava-3.1.1:OPENTELEMETRY_VERSION")
28+
```
29+
30+
### Usage
31+
32+
Enable RxJava instrumentation by calling `TracingAssembly.enable()` once during application startup.
33+
This will automatically instrument all RxJava operations in your application:
34+
35+
```java
36+
import io.opentelemetry.instrumentation.rxjava.v3_1_1.TracingAssembly;
37+
import io.reactivex.rxjava3.core.Observable;
38+
import io.reactivex.rxjava3.core.Flowable;
39+
40+
public class RxJavaExample {
41+
public static void main(String[] args) {
42+
// Enable RxJava instrumentation globally
43+
TracingAssembly tracingAssembly = TracingAssembly.create();
44+
tracingAssembly.enable();
45+
46+
// All RxJava operations will now be automatically instrumented
47+
Observable<String> observable = Observable.just("Hello", "World");
48+
Flowable<String> flowable = Flowable.just("Hello", "World");
49+
50+
observable.subscribe(System.out::println);
51+
flowable.subscribe(System.out::println);
52+
}
53+
}
54+
```

0 commit comments

Comments
 (0)