Skip to content

Commit

Permalink
Polish the docs
Browse files Browse the repository at this point in the history
  • Loading branch information
aaron-ai committed Oct 25, 2022
1 parent bc45833 commit ed21585
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Library Instrumentation for Apache RocketMQ Remoting-based Client version 4.0.0+

Provides OpenTelemetry instrumentation for [Apache RocketMQ](https://rocketmq.apache.org/) Remoting-based Client.
Provides OpenTelemetry instrumentation for [Apache RocketMQ](https://rocketmq.apache.org/) remoting-based client.

## Quickstart

Expand All @@ -12,7 +12,6 @@ release](https://search.maven.org/search?q=g:io.opentelemetry.instrumentation%20
For Maven, add the following to your `pom.xml` dependencies:

```xml

<dependencies>
<dependency>
<groupId>io.opentelemetry.instrumentation</groupId>
Expand All @@ -38,10 +37,8 @@ RocketMqTelemetry rocketMqTelemetry;
void configure(OpenTelemetry openTelemetry, DefaultMQProducerImpl producer, DefaultMQPushConsumerImpl pushConsumer) {
rocketMqTelemetry = RocketMqTelemetry.create(openTelemetry);
// For producer.
SendMessageHook sendMessageHook = rocketMqTelemetry.newTracingSendMessageHook();
producer.registerSendMessageHook(sendMessageHook);
producer.registerSendMessageHook(rocketMqTelemetry.newTracingSendMessageHook());
// For push consumer.
ConsumeMessageHook consumeMessageHook = rocketMqTelemetry.newTracingConsumeMessageHook();
pushConsumer.registerConsumeMessageHook(consumeMessageHook);
pushConsumer.registerConsumeMessageHook(rocketMqTelemetry.newTracingConsumeMessageHook());
}
```

0 comments on commit ed21585

Please sign in to comment.