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 2020/03/03 08:35:16 UTC

[GitHub] [skywalking-rust] wu-sheng opened a new pull request #3: Support ContextManager APIs and context stack-style auto propagation.

wu-sheng opened a new pull request #3: Support ContextManager APIs and context stack-style auto propagation.
URL: https://github.com/apache/skywalking-rust/pull/3
 
 
   High-level APIs introduced in this PR. By leveraging the thread local, it will be better easy to use.
   
   # APIs
   ## High-Level APIs
   High level APIs are targeting convenient usages. These APIs use the ThreadLocal to propagate the context, so users could create span at any moment, and the context will finish automatically once the first created span of this thread stopped.
   
   ```rust
   ContextManager::tracing_entry("op1", Some(&injector), |mut span| {
       // Use span freely in this closure
       // Span's start/end time is set automatically with this closure start/end(s).
       span.tag(Tag::new(String::from("tag1"), String::from("value1")));
   
       ContextManager::tracing_exit("op2", "127.0.0.1:8080", Some(&extractor), |mut span| {
           span.set_component_id(33);
       });
   
       ContextManager::tracing_local("op3", |mut span| {});
   });

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [skywalking-rust] wu-sheng merged pull request #3: Support ContextManager APIs and context stack-style auto propagation.

Posted by GitBox <gi...@apache.org>.
wu-sheng merged pull request #3: Support ContextManager APIs and context stack-style auto propagation.
URL: https://github.com/apache/skywalking-rust/pull/3
 
 
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services