wu-sheng commented on a change in pull request #4555: Correlation protocol 
implement
URL: https://github.com/apache/skywalking/pull/4555#discussion_r396871715
 
 

 ##########
 File path: docs/en/setup/service-agent/java-agent/Application-toolkit-trace.md
 ##########
 @@ -53,3 +53,13 @@ public User methodYouWantToTrace(String param1, String 
param2) {
 }
 ```
 
+* Use `CorrelationContext.set()` API to setting custom data in tracing 
context. Please follow [the agent 
configuration](README.md#table-of-agent-configuration-properties) to get more 
setting limit.
+```java
+optional<String> previous = CorrelationContext.set("customKey", "customValue");
+```
+
+* Use `CorrelationContext.get()` API to get custom data.
+```java
+optional<String> value = CorrelationContext.get("customKey");
+```
+
 
 Review comment:
   ```suggestion
   CorrelationContext configuration descriptions could be found in the [the 
agent configuration](README.md#table-of-agent-configuration-properties) 
documentation, with `correlation.` as the prefix.
   ```

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to