2
2
3
3
This is a lightweight messaging wrappers API designed to help you quickly add instrumentation to any
4
4
type of messaging system client. To further ease the burden of instrumentation, we will also provide
5
- predefined implementations for certain messaging systems, helping you seamlessly address the issue
5
+ predefined implementations for certain messaging systems, helping you seamlessly address the issue
6
6
of broken traces.
7
7
8
8
## Overview
9
9
10
- The primary goal of this API is to simplify the process of adding instrumentation to your messaging
11
- systems, thereby enhancing observability without introducing significant overhead. Inspired by
12
- [ #13340 ] ( https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/13340 ) and
13
- [ opentelemetry-java-instrumentation] ( https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/instrumentation-api-incubator/src/main/java/io/opentelemetry/instrumentation/api/incubator/semconv/messaging/MessagingAttributesExtractor.java ) ,
10
+ The primary goal of this API is to simplify the process of adding instrumentation to your messaging
11
+ systems, thereby enhancing observability without introducing significant overhead. Inspired by
12
+ [ #13340 ] ( https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/13340 ) and
13
+ [ opentelemetry-java-instrumentation] ( https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/instrumentation-api-incubator/src/main/java/io/opentelemetry/instrumentation/api/incubator/semconv/messaging/MessagingAttributesExtractor.java ) ,
14
14
this tool aims to streamline the tracing and monitoring process.
15
15
16
16
## Predefined Implementations
@@ -31,7 +31,7 @@ Gradle and Maven.
31
31
32
32
``` kotlin
33
33
dependencies {
34
- implementation(" io.opentelemetry.contrib:opentelemetry-messaging-wrappers-api" )
34
+ implementation(" io.opentelemetry.contrib:opentelemetry-messaging-wrappers-api: ${latest_version} " )
35
35
}
36
36
```
37
37
@@ -41,6 +41,7 @@ dependencies {
41
41
<dependency >
42
42
<groupId >io.opentelemetry.contrib</groupId >
43
43
<artifactId >opentelemetry-messaging-wrappers-api</artifactId >
44
+ <version >${latest_version}</version >
44
45
</dependency >
45
46
```
46
47
@@ -81,7 +82,7 @@ an implementation based on the OpenTelemetry semantic convention by default.
81
82
82
83
``` java
83
84
public class KafkaDemo {
84
-
85
+
85
86
public static MessagingProcessWrapper<KafkaProcessRequest > createWrapper () {
86
87
return KafkaHelper . processWrapperBuilder(). build();
87
88
}
@@ -98,9 +99,9 @@ If both are enabled, it might result in duplicate nested process spans. It is re
98
99
99
100
``` java
100
101
public class Demo {
101
-
102
+
102
103
private static final MessagingProcessWrapper<MyMessagingProcessRequest > WRAPPER = createWrapper();
103
-
104
+
104
105
public String consume (Message message ) {
105
106
WRAPPER . doProcess(new MyMessagingProcessRequest (message), () - > {
106
107
// your processing logic
0 commit comments