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/07/16 00:52:44 UTC

[GitHub] [skywalking-rust] wu-sheng commented on a diff in pull request #28: Auto finalize context and span when dropped.

wu-sheng commented on code in PR #28:
URL: https://github.com/apache/skywalking-rust/pull/28#discussion_r922592340


##########
README.md:
##########
@@ -37,38 +37,38 @@ context after the span finished.
 use skywalking::context::tracer::Tracer;
 use skywalking::reporter::grpc::GrpcReporter;
 use std::error::Error;
-use std::sync::Arc;
 use tokio::signal;
 
-async fn handle_request(tracer: Arc<Tracer<GrpcReporter>>) {
+async fn handle_request(tracer: Tracer) {
     let mut ctx = tracer.create_trace_context();
 
     {
-        // Generate an Entry Span when a request
-        // is received. An Entry Span is generated only once per context.
-        let span = ctx.create_entry_span("op1").unwrap();
+        // Generate an Entry Span when a request is received.
+        // An Entry Span is generated only once per context.

Review Comment:
   Is this limited through codes? In some rare cases(such as queue bulk consuming), we may face multi-entry spans in one context.



-- 
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