You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2022/10/17 13:58:30 UTC

[GitHub] [skywalking-java] wu-sheng commented on a diff in pull request #351: Unify mq related plugins for virtual mq

wu-sheng commented on code in PR #351:
URL: https://github.com/apache/skywalking-java/pull/351#discussion_r997097500


##########
docs/en/setup/service-agent/java-agent/Java-Plugin-Development-Guide.md:
##########
@@ -209,14 +209,30 @@ Skywalking analysis cache performance related metrics through the following tags
     public static final StringTag CACHE_KEY = new StringTag(18, "cache.key");
 ```
 
-* `cache.type` indicates the cache type , usually it's cache client library name (e.g. Jedis)
+* `cache.type` indicates the cache type , usually it's official name of cache (e.g. Redis)
 * `cache.cmd`  indicates the cache command that would be sent to cache server (e.g. setnx)
 * `cache.op`   indicates the command is used for `write` or `read` operation , usually the value is converting from `command` 
 * `cache.key`  indicates the cache key that would be sent to cache server , this tag maybe null , as string type key would be collected usually.  
 
 In order to decide which `op` should be converted to flexibly , It's better that providing config property .
 Reference  [Jedis-4.x-plugin](https://github.com/apache/skywalking-java/blob/main/apm-sniffer/apm-sdk-plugin/jedis-plugins/jedis-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jedis/v4/JedisPluginConfig.java)
 
+#### Virtual Message Queue (MQ) Relative Tags
+
+SkyWalking analysis MQ performance related metrics through the following tags.
+
+```java
+    public static final StringTag MQ_QUEUE = new StringTag(7, "mq.queue");
+    public static final StringTag MQ_BROKER = new StringTag(8, "mq.broker");
+    public static final StringTag MQ_TOPIC = new StringTag(9, "mq.topic");
+    public static final StringTag TRANSMISSION_LATENCY = new StringTag(15, "transmission.latency", false);
+```
+* `mq.brokers` indicates MQ address ,SkyWalking organize the value as service . Both of consumer , producer must record the tag , and ensure the value is consistent .
+* `mq.queue`   indicates MQ queue name 
+* `mq.topic`   indicates MQ topic name , It's optional as some MQ don't hava concept of `topic`
+* `transmission.latency` The transmission latency from consumer to producer . Usually you needn't to record this tag manually ,instead to call  `contextCarrier.extensionInjector().injectSendingTimestamp();` to record tag `sendingTimestamp` on producer side , and SkyWalking would record this tag  on consumer side if `parentSpan`(from producer side ) contains `sendingTimestamp`

Review Comment:
   ```suggestion
   * `transmission.latency` The transmission latency from consumer to producer. Usually you needn't to record this tag manually, instead to call  `contextCarrier.extensionInjector().injectSendingTimestamp();` to record tag `sendingTimestamp` on producer side , and SkyWalking would record this tag on consumer side if `sw8-x` context carrier(from producer side) contains `sendingTimestamp`
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org