Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions instrumentation/ratpack/ratpack-1.7/library/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# 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.

## 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
<dependencies>
<dependency>
<groupId>io.opentelemetry.instrumentation</groupId>
<artifactId>opentelemetry-ratpack-1.7</artifactId>
<version>OPENTELEMETRY_VERSION</version>
</dependency>
</dependencies>
```

For Gradle, add to your dependencies:

```kotlin
implementation("io.opentelemetry.instrumentation:opentelemetry-ratpack-1.7:OPENTELEMETRY_VERSION")
```

### 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;
import io.opentelemetry.instrumentation.ratpack.v1_7.RatpackClientTelemetry;
import ratpack.server.RatpackServer;
import ratpack.http.client.HttpClient;

public class RatpackConfiguration {

// Create a server with OpenTelemetry instrumentation
public RatpackServer createTracedServer(OpenTelemetry openTelemetry) throws Exception {
RatpackServerTelemetry serverTelemetry = RatpackServerTelemetry.create(openTelemetry);
return RatpackServer.start(server -> {
server.registryOf(serverTelemetry::configureRegistry);
server.handlers(chain ->
chain.get(ctx -> ctx.render("Hello, World!"))
);
});
}

// Create an instrumented HttpClient
public HttpClient createTracedClient(OpenTelemetry openTelemetry) {
RatpackClientTelemetry clientTelemetry = RatpackClientTelemetry.create(openTelemetry);
return clientTelemetry.instrument(createClient());
}

// Configuration of the HttpClient goes here
private HttpClient createClient() {
return HttpClient.of(spec -> {});
}
}
```
48 changes: 48 additions & 0 deletions instrumentation/reactor/reactor-3.1/library/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Library Instrumentation for Project Reactor version 3.1 and higher

Provides OpenTelemetry instrumentation for [Project Reactor](https://projectreactor.io/), enabling
context propagation through Reactor'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-reactor-3.1).

For Maven, add to your `pom.xml` dependencies:

```xml
<dependencies>
<dependency>
<groupId>io.opentelemetry.instrumentation</groupId>
<artifactId>opentelemetry-reactor-3.1</artifactId>
<version>OPENTELEMETRY_VERSION</version>
</dependency>
</dependencies>
```

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) {
ContextPropagationOperator contextPropagationOperator = ContextPropagationOperator.create();
contextPropagationOperator.registerOnEachOperator();

Mono<String> mono = Mono.just("Hello, World!");
Flux<String> flux = Flux.just("Hello", "World");
...
}
}
```
55 changes: 55 additions & 0 deletions instrumentation/restlet/restlet-1.1/library/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Library Instrumentation for Restlet version 1.1 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-1.1).

For Maven, add to your `pom.xml` dependencies:

```xml
<dependencies>
<dependency>
<groupId>io.opentelemetry.instrumentation</groupId>
<artifactId>opentelemetry-restlet-1.1</artifactId>
<version>OPENTELEMETRY_VERSION</version>
</dependency>
</dependencies>
```

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 {
// 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;
}
};
}
}
```
55 changes: 55 additions & 0 deletions instrumentation/restlet/restlet-2.0/library/README.md
Original file line number Diff line number Diff line change
@@ -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
<dependencies>
<dependency>
<groupId>io.opentelemetry.instrumentation</groupId>
<artifactId>opentelemetry-restlet-2.0</artifactId>
<version>OPENTELEMETRY_VERSION</version>
</dependency>
</dependencies>
```

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;
}
};
}
}
```
1 change: 1 addition & 0 deletions instrumentation/rxjava/rxjava-1.0/metadata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
classification: internal
52 changes: 52 additions & 0 deletions instrumentation/rxjava/rxjava-2.0/library/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# 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
<dependencies>
<dependency>
<groupId>io.opentelemetry.instrumentation</groupId>
<artifactId>opentelemetry-rxjava-2.0</artifactId>
<version>OPENTELEMETRY_VERSION</version>
</dependency>
</dependencies>
```

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<String> observable = Observable.just("Hello", "World");
Flowable<String> flowable = Flowable.just("Hello", "World");
...
}
}
```
52 changes: 52 additions & 0 deletions instrumentation/rxjava/rxjava-3.1.1/library/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# 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
<dependencies>
<dependency>
<groupId>io.opentelemetry.instrumentation</groupId>
<artifactId>opentelemetry-rxjava-3.1.1</artifactId>
<version>OPENTELEMETRY_VERSION</version>
</dependency>
</dependencies>
```

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<String> observable = Observable.just("Hello", "World");
Flowable<String> flowable = Flowable.just("Hello", "World");
...
}
}
```