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/01/10 03:06:29 UTC

[GitHub] [skywalking-rust] tisonkun opened a new pull request #9: self-contained example & gracefully shutdown reporter

tisonkun opened a new pull request #9:
URL: https://github.com/apache/skywalking-rust/pull/9


   Signed-off-by: tison <wa...@gmail.com>
   
   cc @wu-sheng @Shikugawa 


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



[GitHub] [skywalking-rust] codecov-commenter edited a comment on pull request #9: gracefully shutdown reporter

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #9:
URL: https://github.com/apache/skywalking-rust/pull/9#issuecomment-1008507190


   # [Codecov](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#9](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (b8fc551) into [master](https://codecov.io/gh/apache/skywalking-rust/commit/1465d9fc6811dcb009e75f5c1dd2d5b1ef7a52a9?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (1465d9f) will **decrease** coverage by `3.44%`.
   > The diff coverage is `7.69%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/skywalking-rust/pull/9/graphs/tree.svg?width=650&height=150&src=pr&token=F7BQW5GURE&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master       #9      +/-   ##
   ==========================================
   - Coverage   88.60%   85.15%   -3.45%     
   ==========================================
     Files           9        9              
     Lines         272      283      +11     
   ==========================================
     Hits          241      241              
   - Misses         31       42      +11     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [src/context/trace\_context.rs](https://codecov.io/gh/apache/skywalking-rust/pull/9/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL2NvbnRleHQvdHJhY2VfY29udGV4dC5ycw==) | `69.81% <0.00%> (-6.48%)` | :arrow_down: |
   | [src/reporter/grpc.rs](https://codecov.io/gh/apache/skywalking-rust/pull/9/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL3JlcG9ydGVyL2dycGMucnM=) | `0.00% <0.00%> (ø)` | |
   | [src/context/propagation/encoder.rs](https://codecov.io/gh/apache/skywalking-rust/pull/9/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL2NvbnRleHQvcHJvcGFnYXRpb24vZW5jb2Rlci5ycw==) | `100.00% <100.00%> (ø)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [1465d9f...b8fc551](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


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



[GitHub] [skywalking-rust] tisonkun commented on pull request #9: gracefully shutdown reporter

Posted by GitBox <gi...@apache.org>.
tisonkun commented on pull request #9:
URL: https://github.com/apache/skywalking-rust/pull/9#issuecomment-1012158502


   @wu-sheng the current tests under `tests/e2e` folder is of type (2). So I'm trying to enable this test to proceeding my patch.
   
   I've verified it locally by:
   
   ```
   docker run -it -p 19876:19876 -p 12800:12800 skywalking-rust_collector
   cargo run -- --mode consumer # under tests/e2e/
   cargo run -- --mode producer # under tests/e2e/
   python3 tests/e2e/run_e2e.py --expected_file=tests/e2e/data/expected_context.yaml  --max_retry_times=3 --target_path=/ping # under root path
   ```
   
   but fighting with bring it to docker-compose based e2e config...
   
   cc @Shikugawa 


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



[GitHub] [skywalking-rust] wu-sheng commented on pull request #9: gracefully shutdown reporter

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on pull request #9:
URL: https://github.com/apache/skywalking-rust/pull/9#issuecomment-1012219174


   I have seen you added a health check. This is important.


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



[GitHub] [skywalking-rust] tisonkun commented on a change in pull request #9: self-contained example & gracefully shutdown reporter

Posted by GitBox <gi...@apache.org>.
tisonkun commented on a change in pull request #9:
URL: https://github.com/apache/skywalking-rust/pull/9#discussion_r780924381



##########
File path: src/reporter/grpc.rs
##########
@@ -51,23 +53,51 @@ impl Reporter {
     /// use skywalking_rust::reporter::grpc::Reporter;
     ///
     /// #[tokio::main]
-    /// async fn main (){
-    ///     let tx = Reporter::start("localhost:12800").await;
+    /// async fn main () -> Result<(), Box<dyn Error>> {
+    ///     let reporter = Reporter::start("localhost:12800").await;
     ///     let mut context = TracingContext::default("service", "instance");
-    ///     tx.send(context).await;
+    ///     reporter.sender().send(context).await?;
+    ///     reporter.shutdown().await?;
     /// }
     /// ```
-    pub async fn start(address: &str) -> ContextReporter {
+    pub async fn start(address: impl Into<String>) -> Self {
         let (tx, mut rx): (mpsc::Sender<TracingContext>, mpsc::Receiver<TracingContext>) =
             mpsc::channel(CHANNEL_BUF_SIZE);
-        let mut reporter = ReporterClient::connect(address.to_string()).await.unwrap();
+        let (shutdown_tx, mut shutdown_rx) = mpsc::channel(1);
+
+        let mut reporter = ReporterClient::connect(address.into()).await.unwrap();
         tokio::spawn(async move {
+            loop {
+                tokio::select! {
+                    message = rx.recv() => {
+                        if let Some(message) = message {
+                            flush(&mut reporter, message.convert_segment_object()).await.unwrap();
+                        } else {
+                            break;
+                        }
+                    },
+                    _ = shutdown_rx.recv() => {
+                        break;
+                    }
+                }
+            }
+            rx.close();
             while let Some(message) = rx.recv().await {

Review comment:
       No. If a select chooses shutdown first, there can be outstanding messages to be processed. We close the `rx` so that there is no more inflight message, but the outstanding ones should be processed.
   
   See also https://docs.rs/tokio/1.15.0/tokio/sync/mpsc/struct.Receiver.html#method.close for example.




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



[GitHub] [skywalking-rust] wu-sheng commented on pull request #9: self-contained example & gracefully shutdown reporter

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on pull request #9:
URL: https://github.com/apache/skywalking-rust/pull/9#issuecomment-1008519118


   I would like to recommend you to add an e2e test case for this repo, which has more value from our experiences.


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



[GitHub] [skywalking-rust] wu-sheng merged pull request #9: gracefully shutdown reporter & add agent-test-tool based e2e case

Posted by GitBox <gi...@apache.org>.
wu-sheng merged pull request #9:
URL: https://github.com/apache/skywalking-rust/pull/9


   


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



[GitHub] [skywalking-rust] kezhenxu94 edited a comment on pull request #9: gracefully shutdown reporter

Posted by GitBox <gi...@apache.org>.
kezhenxu94 edited a comment on pull request #9:
URL: https://github.com/apache/skywalking-rust/pull/9#issuecomment-1012219130


   > It seems that `depends_on` doesn't take effect and consumer/producer runs before collector and panic...I don't know how to process then. If I manually start service parts one by one, the test can pass.
   
   depends_on should take effects, what is out of expectation is that consumer/provider tries to do something before  OAP is ready. Please use 
   
   ```yaml
   depends_on:
     oap:
       condition: service_healthy
   ```
   
   And add a health check for OAP. 
   
   NOTE: version 3.7 of docker compose file might not accept this syntax but I know 3.8 and 2.1 can. 


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



[GitHub] [skywalking-rust] tisonkun commented on pull request #9: gracefully shutdown reporter

Posted by GitBox <gi...@apache.org>.
tisonkun commented on pull request #9:
URL: https://github.com/apache/skywalking-rust/pull/9#issuecomment-1012210806


   It seems that `depends_on` doesn't take effect and consumer/producer runs before collector and panic...I don't know how to process then. If I manually start service parts one by one, the test can pass.


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



[GitHub] [skywalking-rust] codecov-commenter edited a comment on pull request #9: gracefully shutdown reporter

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #9:
URL: https://github.com/apache/skywalking-rust/pull/9#issuecomment-1008507190


   # [Codecov](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#9](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (1f67106) into [master](https://codecov.io/gh/apache/skywalking-rust/commit/1465d9fc6811dcb009e75f5c1dd2d5b1ef7a52a9?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (1465d9f) will **decrease** coverage by `3.44%`.
   > The diff coverage is `7.69%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/skywalking-rust/pull/9/graphs/tree.svg?width=650&height=150&src=pr&token=F7BQW5GURE&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master       #9      +/-   ##
   ==========================================
   - Coverage   88.60%   85.15%   -3.45%     
   ==========================================
     Files           9        9              
     Lines         272      283      +11     
   ==========================================
     Hits          241      241              
   - Misses         31       42      +11     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [src/context/trace\_context.rs](https://codecov.io/gh/apache/skywalking-rust/pull/9/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL2NvbnRleHQvdHJhY2VfY29udGV4dC5ycw==) | `69.81% <0.00%> (-6.48%)` | :arrow_down: |
   | [src/reporter/grpc.rs](https://codecov.io/gh/apache/skywalking-rust/pull/9/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL3JlcG9ydGVyL2dycGMucnM=) | `0.00% <0.00%> (ø)` | |
   | [src/context/propagation/encoder.rs](https://codecov.io/gh/apache/skywalking-rust/pull/9/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL2NvbnRleHQvcHJvcGFnYXRpb24vZW5jb2Rlci5ycw==) | `100.00% <100.00%> (ø)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [1465d9f...1f67106](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


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



[GitHub] [skywalking-rust] codecov-commenter edited a comment on pull request #9: gracefully shutdown reporter

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #9:
URL: https://github.com/apache/skywalking-rust/pull/9#issuecomment-1008507190


   # [Codecov](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#9](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (84c2afa) into [master](https://codecov.io/gh/apache/skywalking-rust/commit/1465d9fc6811dcb009e75f5c1dd2d5b1ef7a52a9?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (1465d9f) will **decrease** coverage by `3.44%`.
   > The diff coverage is `7.69%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/skywalking-rust/pull/9/graphs/tree.svg?width=650&height=150&src=pr&token=F7BQW5GURE&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master       #9      +/-   ##
   ==========================================
   - Coverage   88.60%   85.15%   -3.45%     
   ==========================================
     Files           9        9              
     Lines         272      283      +11     
   ==========================================
     Hits          241      241              
   - Misses         31       42      +11     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [src/context/trace\_context.rs](https://codecov.io/gh/apache/skywalking-rust/pull/9/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL2NvbnRleHQvdHJhY2VfY29udGV4dC5ycw==) | `69.81% <0.00%> (-6.48%)` | :arrow_down: |
   | [src/reporter/grpc.rs](https://codecov.io/gh/apache/skywalking-rust/pull/9/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL3JlcG9ydGVyL2dycGMucnM=) | `0.00% <0.00%> (ø)` | |
   | [src/context/propagation/encoder.rs](https://codecov.io/gh/apache/skywalking-rust/pull/9/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL2NvbnRleHQvcHJvcGFnYXRpb24vZW5jb2Rlci5ycw==) | `100.00% <100.00%> (ø)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [1465d9f...84c2afa](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


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



[GitHub] [skywalking-rust] wu-sheng commented on pull request #9: self-contained example & gracefully shutdown reporter

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on pull request #9:
URL: https://github.com/apache/skywalking-rust/pull/9#issuecomment-1008517488


   Hi, if you want self-contained, this is another example. As a client, the official way to test is set up e2e, which this lib is only working as a client.
   Self-contained is tricky because without SkyWalking OAP running, this client could send tracing w/ grpc means nothing.


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



[GitHub] [skywalking-rust] wu-sheng commented on pull request #9: self-contained example & gracefully shutdown reporter

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on pull request #9:
URL: https://github.com/apache/skywalking-rust/pull/9#issuecomment-1008584416


   > That makes sense. I'm confused about how to run the example properly and failed to find a resource to set up the environment.
   
   Because you need a backend and UI, https://skywalking.apache.org/docs/main/v8.9.1/readme/. 
   About the self-hosted, it is not 100% meaningless, but mostly, it just could print the segment values.


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



[GitHub] [skywalking-rust] codecov-commenter edited a comment on pull request #9: gracefully shutdown reporter

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #9:
URL: https://github.com/apache/skywalking-rust/pull/9#issuecomment-1008507190


   # [Codecov](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#9](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (11bc092) into [master](https://codecov.io/gh/apache/skywalking-rust/commit/1465d9fc6811dcb009e75f5c1dd2d5b1ef7a52a9?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (1465d9f) will **decrease** coverage by `3.44%`.
   > The diff coverage is `7.69%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/skywalking-rust/pull/9/graphs/tree.svg?width=650&height=150&src=pr&token=F7BQW5GURE&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master       #9      +/-   ##
   ==========================================
   - Coverage   88.60%   85.15%   -3.45%     
   ==========================================
     Files           9        9              
     Lines         272      283      +11     
   ==========================================
     Hits          241      241              
   - Misses         31       42      +11     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [src/context/trace\_context.rs](https://codecov.io/gh/apache/skywalking-rust/pull/9/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL2NvbnRleHQvdHJhY2VfY29udGV4dC5ycw==) | `69.81% <0.00%> (-6.48%)` | :arrow_down: |
   | [src/reporter/grpc.rs](https://codecov.io/gh/apache/skywalking-rust/pull/9/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL3JlcG9ydGVyL2dycGMucnM=) | `0.00% <0.00%> (ø)` | |
   | [src/context/propagation/encoder.rs](https://codecov.io/gh/apache/skywalking-rust/pull/9/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL2NvbnRleHQvcHJvcGFnYXRpb24vZW5jb2Rlci5ycw==) | `100.00% <100.00%> (ø)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [1465d9f...11bc092](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


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



[GitHub] [skywalking-rust] tisonkun commented on pull request #9: self-contained example & gracefully shutdown reporter

Posted by GitBox <gi...@apache.org>.
tisonkun commented on pull request #9:
URL: https://github.com/apache/skywalking-rust/pull/9#issuecomment-1008685388


   @wu-sheng It seems the example can leave as is and I can verify the graceful shutdown logic by fixing [current e2e test](https://github.com/apache/skywalking-rust/blob/master/tests/e2e/src/main.rs).


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



[GitHub] [skywalking-rust] wu-sheng commented on pull request #9: gracefully shutdown reporter & add agent-test-tool based e2e case

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on pull request #9:
URL: https://github.com/apache/skywalking-rust/pull/9#issuecomment-1012709752


   I am fine that these two are in one PR, as this repo is a very early stage.
   
   But I hope you could recheck the test coverage
   > src/context/trace_context.rs | 69.81% <0.00%> (-6.48%)
   
   I am not sure whether e2e testing could be counted in Rust, but it can be in the Java.


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



[GitHub] [skywalking-rust] tisonkun edited a comment on pull request #9: gracefully shutdown reporter & add agent-test-tool based e2e case

Posted by GitBox <gi...@apache.org>.
tisonkun edited a comment on pull request #9:
URL: https://github.com/apache/skywalking-rust/pull/9#issuecomment-1012712902


   @wu-sheng I checked the report and don't think it's a real regression:
   
   1. "Regressions" on `impl fmt:Debug`. It's meaningless to test a standard lib implementation.
   2. "Regressions" on `shutdown`/`sender`.  The e2e test should cover it.


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



[GitHub] [skywalking-rust] codecov-commenter edited a comment on pull request #9: self-contained example & gracefully shutdown reporter

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #9:
URL: https://github.com/apache/skywalking-rust/pull/9#issuecomment-1008507190


   # [Codecov](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#9](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (ee8b736) into [master](https://codecov.io/gh/apache/skywalking-rust/commit/1465d9fc6811dcb009e75f5c1dd2d5b1ef7a52a9?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (1465d9f) will **decrease** coverage by `3.44%`.
   > The diff coverage is `7.69%`.
   
   > :exclamation: Current head ee8b736 differs from pull request most recent head 89848ac. Consider uploading reports for the commit 89848ac to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/skywalking-rust/pull/9/graphs/tree.svg?width=650&height=150&src=pr&token=F7BQW5GURE&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master       #9      +/-   ##
   ==========================================
   - Coverage   88.60%   85.15%   -3.45%     
   ==========================================
     Files           9        9              
     Lines         272      283      +11     
   ==========================================
     Hits          241      241              
   - Misses         31       42      +11     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [src/context/trace\_context.rs](https://codecov.io/gh/apache/skywalking-rust/pull/9/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL2NvbnRleHQvdHJhY2VfY29udGV4dC5ycw==) | `69.81% <0.00%> (-6.48%)` | :arrow_down: |
   | [src/reporter/grpc.rs](https://codecov.io/gh/apache/skywalking-rust/pull/9/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL3JlcG9ydGVyL2dycGMucnM=) | `0.00% <0.00%> (ø)` | |
   | [src/context/propagation/encoder.rs](https://codecov.io/gh/apache/skywalking-rust/pull/9/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL2NvbnRleHQvcHJvcGFnYXRpb24vZW5jb2Rlci5ycw==) | `100.00% <100.00%> (ø)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [1465d9f...89848ac](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


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



[GitHub] [skywalking-rust] tisonkun commented on pull request #9: gracefully shutdown reporter & add agent-test-tool based e2e case

Posted by GitBox <gi...@apache.org>.
tisonkun commented on pull request #9:
URL: https://github.com/apache/skywalking-rust/pull/9#issuecomment-1012712902


   @wu-sheng I checked the report and don't think it's a real regression:
   
   1. "Regressions" on `impl fmt:Debug`. It's meaningless to test an standard lib implementation.
   2. "Regressions" on `shutdown`/`sender`.  The e2e test should cover it.


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



[GitHub] [skywalking-rust] tisonkun commented on a change in pull request #9: gracefully shutdown reporter

Posted by GitBox <gi...@apache.org>.
tisonkun commented on a change in pull request #9:
URL: https://github.com/apache/skywalking-rust/pull/9#discussion_r784465036



##########
File path: .github/workflows/e2e.yml
##########
@@ -0,0 +1,25 @@
+name: agent-test-tool
+
+on:
+  pull_request:
+  push:
+    branches:
+      - master
+    tags:
+      - 'v*'
+
+jobs:
+  e2e-rust:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v2
+        with:
+          submodules: recursive
+      - name: Prepare service container
+        run: docker-compose -f docker-compose.e2e.yml up --build -d
+      - name: Run e2e
+        run: |
+          pip3 install --upgrade pip
+          pip3 install setuptools
+          pip3 install -r requirements.txt
+          python3 tests/e2e/run_e2e.py --expected_file=tests/e2e/data/expected_context.yaml --max_retry_times=3 --target_path=/ping

Review comment:
       It's already in the codebase here: https://github.com/apache/skywalking-rust/blob/1465d9fc6811dcb009e75f5c1dd2d5b1ef7a52a9/tests/e2e/data/expected_context.yaml
   
   I don't add a new test case but according to your suggestion https://github.com/apache/skywalking-rust/pull/9#issuecomment-1008699575, enable the existing but not in regression e2e test - it's a plugin test based on agent-test-tool.




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



[GitHub] [skywalking-rust] codecov-commenter edited a comment on pull request #9: gracefully shutdown reporter

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #9:
URL: https://github.com/apache/skywalking-rust/pull/9#issuecomment-1008507190


   # [Codecov](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#9](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (7f46110) into [master](https://codecov.io/gh/apache/skywalking-rust/commit/1465d9fc6811dcb009e75f5c1dd2d5b1ef7a52a9?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (1465d9f) will **decrease** coverage by `3.44%`.
   > The diff coverage is `7.69%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/skywalking-rust/pull/9/graphs/tree.svg?width=650&height=150&src=pr&token=F7BQW5GURE&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master       #9      +/-   ##
   ==========================================
   - Coverage   88.60%   85.15%   -3.45%     
   ==========================================
     Files           9        9              
     Lines         272      283      +11     
   ==========================================
     Hits          241      241              
   - Misses         31       42      +11     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [src/context/trace\_context.rs](https://codecov.io/gh/apache/skywalking-rust/pull/9/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL2NvbnRleHQvdHJhY2VfY29udGV4dC5ycw==) | `69.81% <0.00%> (-6.48%)` | :arrow_down: |
   | [src/reporter/grpc.rs](https://codecov.io/gh/apache/skywalking-rust/pull/9/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL3JlcG9ydGVyL2dycGMucnM=) | `0.00% <0.00%> (ø)` | |
   | [src/context/propagation/encoder.rs](https://codecov.io/gh/apache/skywalking-rust/pull/9/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL2NvbnRleHQvcHJvcGFnYXRpb24vZW5jb2Rlci5ycw==) | `100.00% <100.00%> (ø)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [1465d9f...7f46110](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


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



[GitHub] [skywalking-rust] tisonkun commented on pull request #9: gracefully shutdown reporter & add agent-test-tool based e2e case

Posted by GitBox <gi...@apache.org>.
tisonkun commented on pull request #9:
URL: https://github.com/apache/skywalking-rust/pull/9#issuecomment-1012701265


   @wu-sheng updated. Notify me if it's better to split into two PRs.


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



[GitHub] [skywalking-rust] tisonkun commented on pull request #9: gracefully shutdown reporter & add agent-test-tool based e2e case

Posted by GitBox <gi...@apache.org>.
tisonkun commented on pull request #9:
URL: https://github.com/apache/skywalking-rust/pull/9#issuecomment-1013602260


   @wu-sheng @Shikugawa according to the failure report, it seems the received data is unstable (not stably matches the expected data).
   
   https://github.com/apache/skywalking-rust/runs/4818192129?check_suite_focus=true
   
   ```
   diff list: 
   - meterItems: []
     segmentItems:
     - segmentSize: 1
       segments:
   -   - segmentId: '184682932856352416001309273098852514966'
   +   - segmentId: not null
         spans:
         - componentId: 11000
   -       endTime: 1642171583
   +       endTime: gt 0
           isError: false
   +       operationId: 0
           operationName: /pong
           parentSpanId: 1
           peer: consumer:8082
           skipAnalysis: false
           spanId: 2
           spanLayer: Http
           spanType: Exit
   -       startTime: 1642171583
   +       startTime: gt 0
         - componentId: 11000
   -       endTime: 1642171583
   +       endTime: gt 0
           isError: false
   +       operationId: 0
           operationName: /ping
           parentSpanId: 0
           peer: ''
           skipAnalysis: false
           spanId: 1
           spanLayer: Http
           spanType: Entry
   -       startTime: 1642171583
   +       startTime: gt 0
       serviceName: producer
     - segmentSize: 1
       segments:
   -   - segmentId: '251652345953849008728622634953354684403'
   +   - segmentId: not null
         spans:
         - componentId: 11000
   -       endTime: 1642171583
   +       endTime: gt 0
           isError: false
   +       operationId: 0
           operationName: /pong
           parentSpanId: 0
           peer: ''
           refs:
           - networkAddress: consumer:8082
             parentEndpoint: /pong
             parentService: producer
             parentServiceInstance: node_0
             parentSpanId: 2
   -         parentTraceSegmentId: '184682932856352416001309273098852514966'
   +         parentTraceSegmentId: not null
             refType: CrossProcess
   -         traceId: '280108941388649570187429178111613482643'
   +         traceId: not null
           skipAnalysis: false
           spanId: 1
           spanLayer: Http
           spanType: Entry
   -       startTime: 1642171583
   +       startTime: gt 0
       serviceName: consumer
   Traceback (most recent call last):
     File "tests/e2e/run_e2e.py", line 60, in <module>
       assert res.status_code == 200
   AssertionError
   ```


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



[GitHub] [skywalking-rust] Shikugawa commented on pull request #9: self-contained example & gracefully shutdown reporter

Posted by GitBox <gi...@apache.org>.
Shikugawa commented on pull request #9:
URL: https://github.com/apache/skywalking-rust/pull/9#issuecomment-1008545344


   @tisonkun Thank you for awesome contribution! If you are interested in e2e framework, you should see [here](https://github.com/Shikugawa/rs2sky/tree/main/tests/e2e) (This is my experimental work of e2e, but it is not ready for production). It may help you.


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



[GitHub] [skywalking-rust] tisonkun commented on pull request #9: self-contained example & gracefully shutdown reporter

Posted by GitBox <gi...@apache.org>.
tisonkun commented on pull request #9:
URL: https://github.com/apache/skywalking-rust/pull/9#issuecomment-1008582962


   > I would like to recommend you to add an e2e test case for this repo, which has more value from our experiences.
   
   That makes sense. I'm confused about how to run the example properly and failed to find a resource to set up the environment.
   
   Thanks for your information. Let me dig it out.


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



[GitHub] [skywalking-rust] Shikugawa commented on pull request #9: self-contained example & gracefully shutdown reporter

Posted by GitBox <gi...@apache.org>.
Shikugawa commented on pull request #9:
URL: https://github.com/apache/skywalking-rust/pull/9#issuecomment-1008611912


   > > I would like to recommend you to add an e2e test case for this repo, which has more value from our experiences.
   > 
   > That makes sense. I'm confused about how to run the example properly and failed to find a resource to set up the environment.
   > 
   > Thanks for your information. Let me dig it out.
   
   We preapred simple docker-compose envs [here](https://github.com/apache/skywalking-rust/blob/master/docker-compose.e2e.yml).
   Also, your change will break e2e code [here](https://github.com/apache/skywalking-rust/blob/master/tests/e2e/src/main.rs).


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



[GitHub] [skywalking-rust] tisonkun edited a comment on pull request #9: self-contained example & gracefully shutdown reporter

Posted by GitBox <gi...@apache.org>.
tisonkun edited a comment on pull request #9:
URL: https://github.com/apache/skywalking-rust/pull/9#issuecomment-1008685388


   @wu-sheng It seems the example can leave as is (without starting a server) and I can verify the graceful shutdown logic by fixing [current e2e test](https://github.com/apache/skywalking-rust/blob/master/tests/e2e/src/main.rs).


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



[GitHub] [skywalking-rust] Shikugawa commented on a change in pull request #9: self-contained example & gracefully shutdown reporter

Posted by GitBox <gi...@apache.org>.
Shikugawa commented on a change in pull request #9:
URL: https://github.com/apache/skywalking-rust/pull/9#discussion_r780896095



##########
File path: examples/simple_trace_report.rs
##########
@@ -1,14 +1,67 @@
+use std::error::Error;

Review comment:
       Could we add new file which includes self-contained example?

##########
File path: src/reporter/grpc.rs
##########
@@ -51,23 +53,51 @@ impl Reporter {
     /// use skywalking_rust::reporter::grpc::Reporter;
     ///
     /// #[tokio::main]
-    /// async fn main (){
-    ///     let tx = Reporter::start("localhost:12800").await;
+    /// async fn main () -> Result<(), Box<dyn Error>> {
+    ///     let reporter = Reporter::start("localhost:12800").await;
     ///     let mut context = TracingContext::default("service", "instance");
-    ///     tx.send(context).await;
+    ///     reporter.sender().send(context).await?;
+    ///     reporter.shutdown().await?;
     /// }
     /// ```
-    pub async fn start(address: &str) -> ContextReporter {
+    pub async fn start(address: impl Into<String>) -> Self {
         let (tx, mut rx): (mpsc::Sender<TracingContext>, mpsc::Receiver<TracingContext>) =
             mpsc::channel(CHANNEL_BUF_SIZE);
-        let mut reporter = ReporterClient::connect(address.to_string()).await.unwrap();
+        let (shutdown_tx, mut shutdown_rx) = mpsc::channel(1);
+
+        let mut reporter = ReporterClient::connect(address.into()).await.unwrap();
         tokio::spawn(async move {
+            loop {
+                tokio::select! {
+                    message = rx.recv() => {
+                        if let Some(message) = message {
+                            flush(&mut reporter, message.convert_segment_object()).await.unwrap();
+                        } else {
+                            break;
+                        }
+                    },
+                    _ = shutdown_rx.recv() => {
+                        break;
+                    }
+                }
+            }
+            rx.close();
             while let Some(message) = rx.recv().await {

Review comment:
       It may not be required anymore.




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



[GitHub] [skywalking-rust] wu-sheng commented on pull request #9: gracefully shutdown reporter

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on pull request #9:
URL: https://github.com/apache/skywalking-rust/pull/9#issuecomment-1008973015


   Yes, e2e is a new case.


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



[GitHub] [skywalking-rust] codecov-commenter edited a comment on pull request #9: gracefully shutdown reporter

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #9:
URL: https://github.com/apache/skywalking-rust/pull/9#issuecomment-1008507190


   # [Codecov](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#9](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (515a14a) into [master](https://codecov.io/gh/apache/skywalking-rust/commit/1465d9fc6811dcb009e75f5c1dd2d5b1ef7a52a9?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (1465d9f) will **decrease** coverage by `3.44%`.
   > The diff coverage is `7.69%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/skywalking-rust/pull/9/graphs/tree.svg?width=650&height=150&src=pr&token=F7BQW5GURE&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master       #9      +/-   ##
   ==========================================
   - Coverage   88.60%   85.15%   -3.45%     
   ==========================================
     Files           9        9              
     Lines         272      283      +11     
   ==========================================
     Hits          241      241              
   - Misses         31       42      +11     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [src/context/trace\_context.rs](https://codecov.io/gh/apache/skywalking-rust/pull/9/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL2NvbnRleHQvdHJhY2VfY29udGV4dC5ycw==) | `69.81% <0.00%> (-6.48%)` | :arrow_down: |
   | [src/reporter/grpc.rs](https://codecov.io/gh/apache/skywalking-rust/pull/9/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL3JlcG9ydGVyL2dycGMucnM=) | `0.00% <0.00%> (ø)` | |
   | [src/context/propagation/encoder.rs](https://codecov.io/gh/apache/skywalking-rust/pull/9/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL2NvbnRleHQvcHJvcGFnYXRpb24vZW5jb2Rlci5ycw==) | `100.00% <100.00%> (ø)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [1465d9f...515a14a](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


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



[GitHub] [skywalking-rust] kezhenxu94 edited a comment on pull request #9: gracefully shutdown reporter

Posted by GitBox <gi...@apache.org>.
kezhenxu94 edited a comment on pull request #9:
URL: https://github.com/apache/skywalking-rust/pull/9#issuecomment-1012219130


   > It seems that `depends_on` doesn't take effect and consumer/producer runs before collector and panic...I don't know how to process then. If I manually start service parts one by one, the test can pass.
   
   depends_on should take effects, what is out of expectation is that consumer/provider tries to do something that OAP is not yet ready. Please use 
   
   ```yaml
   depends_on:
     oap:
       condition: service_healthy
   ```
   
   And add a health check for OAP. 
   
   NOTE: version 3.7 of docker compose file might not accept this syntax but I know 3.8 and 2.1 can. 


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



[GitHub] [skywalking-rust] tisonkun commented on pull request #9: gracefully shutdown reporter

Posted by GitBox <gi...@apache.org>.
tisonkun commented on pull request #9:
URL: https://github.com/apache/skywalking-rust/pull/9#issuecomment-1012277184


   Finally I hack through it.
   
   I think this is ready for review, but I still confuse why https://github.com/apache/skywalking-rust/pull/9/commits/bbda7cfc539dfecf71254f2db0ad16fe51caa1c7 causes hanging forever :(


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



[GitHub] [skywalking-rust] wu-sheng commented on pull request #9: gracefully shutdown reporter & add agent-test-tool based e2e case

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on pull request #9:
URL: https://github.com/apache/skywalking-rust/pull/9#issuecomment-1013614810


   I think the key point is `AssertionError`, which seems the observed services are not available.


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



[GitHub] [skywalking-rust] tisonkun commented on pull request #9: self-contained example & gracefully shutdown reporter

Posted by GitBox <gi...@apache.org>.
tisonkun commented on pull request #9:
URL: https://github.com/apache/skywalking-rust/pull/9#issuecomment-1008515423


   I noticed that we may not use mpsc::channel at all.
   
   Currently, the reporter flushes per context on the streaming rpc. May you provide other languages' reporter implementation as references and I can work for a proper API.


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



[GitHub] [skywalking-rust] wu-sheng commented on pull request #9: self-contained example & gracefully shutdown reporter

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on pull request #9:
URL: https://github.com/apache/skywalking-rust/pull/9#issuecomment-1008699575


   @tisonkun E2E has a very specific meaning in the SkyWalking context. 
   
   There are 2 kinds of E2E tests.
   1. E2E with SkyWalking backend. (I think this isn't @Shikugawa 's suggestion, just mention it here to make the context clear)
   You could learn [this tool](https://skywalking.apache.org/docs/skywalking-infra-e2e/latest/readme/), which is an established sub-project for a docker-compose/KinD(k8s) env testing to verify how components work with each other because the SkyWalking ecosystem is super large and complex.
   
   2. Plugin tests with [agent-test-tool](https://github.com/apache/skywalking-agent-test-tool), which is a mock OAP server to collect and print data to a YAML for you. Here is [how it is used in cpp2sky](https://github.com/SkyAPM/cpp2sky/blob/34053a05c3e1b6304704f074f648238dac733564/docker-compose.e2e.yml?_pjax=%23js-repo-pjax-container%3Afirst-of-type%2C%20div%5Bitemtype%3D%22http%3A%2F%2Fschema.org%2FSoftwareSourceCode%22%5D%20main%3Afirst-of-type%2C%20%5Bdata-pjax-container%5D%3Afirst-of-type#L6).
   
   ___
   You should follow (2) more for the rust plugin. This test is working as `rust-a` -> `rust-b`, and both of them are sending trace data to `mock-collector`. Then verifying the data from `mock-collector` with the expected data file you provided.
   


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



[GitHub] [skywalking-rust] codecov-commenter commented on pull request #9: self-contained example & gracefully shutdown reporter

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #9:
URL: https://github.com/apache/skywalking-rust/pull/9#issuecomment-1008507190


   # [Codecov](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#9](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (e8dd804) into [master](https://codecov.io/gh/apache/skywalking-rust/commit/1465d9fc6811dcb009e75f5c1dd2d5b1ef7a52a9?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (1465d9f) will **decrease** coverage by `3.44%`.
   > The diff coverage is `7.69%`.
   
   > :exclamation: Current head e8dd804 differs from pull request most recent head 89848ac. Consider uploading reports for the commit 89848ac to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/skywalking-rust/pull/9/graphs/tree.svg?width=650&height=150&src=pr&token=F7BQW5GURE&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master       #9      +/-   ##
   ==========================================
   - Coverage   88.60%   85.15%   -3.45%     
   ==========================================
     Files           9        9              
     Lines         272      283      +11     
   ==========================================
     Hits          241      241              
   - Misses         31       42      +11     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [src/context/trace\_context.rs](https://codecov.io/gh/apache/skywalking-rust/pull/9/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL2NvbnRleHQvdHJhY2VfY29udGV4dC5ycw==) | `69.81% <0.00%> (-6.48%)` | :arrow_down: |
   | [src/reporter/grpc.rs](https://codecov.io/gh/apache/skywalking-rust/pull/9/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL3JlcG9ydGVyL2dycGMucnM=) | `0.00% <0.00%> (ø)` | |
   | [src/context/propagation/encoder.rs](https://codecov.io/gh/apache/skywalking-rust/pull/9/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL2NvbnRleHQvcHJvcGFnYXRpb24vZW5jb2Rlci5ycw==) | `100.00% <100.00%> (ø)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [1465d9f...89848ac](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


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



[GitHub] [skywalking-rust] codecov-commenter edited a comment on pull request #9: gracefully shutdown reporter

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #9:
URL: https://github.com/apache/skywalking-rust/pull/9#issuecomment-1008507190


   # [Codecov](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#9](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (7bcd3a4) into [master](https://codecov.io/gh/apache/skywalking-rust/commit/1465d9fc6811dcb009e75f5c1dd2d5b1ef7a52a9?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (1465d9f) will **decrease** coverage by `3.44%`.
   > The diff coverage is `7.69%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/skywalking-rust/pull/9/graphs/tree.svg?width=650&height=150&src=pr&token=F7BQW5GURE&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master       #9      +/-   ##
   ==========================================
   - Coverage   88.60%   85.15%   -3.45%     
   ==========================================
     Files           9        9              
     Lines         272      283      +11     
   ==========================================
     Hits          241      241              
   - Misses         31       42      +11     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [src/context/trace\_context.rs](https://codecov.io/gh/apache/skywalking-rust/pull/9/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL2NvbnRleHQvdHJhY2VfY29udGV4dC5ycw==) | `69.81% <0.00%> (-6.48%)` | :arrow_down: |
   | [src/reporter/grpc.rs](https://codecov.io/gh/apache/skywalking-rust/pull/9/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL3JlcG9ydGVyL2dycGMucnM=) | `0.00% <0.00%> (ø)` | |
   | [src/context/propagation/encoder.rs](https://codecov.io/gh/apache/skywalking-rust/pull/9/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL2NvbnRleHQvcHJvcGFnYXRpb24vZW5jb2Rlci5ycw==) | `100.00% <100.00%> (ø)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [1465d9f...7bcd3a4](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


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



[GitHub] [skywalking-rust] wu-sheng commented on pull request #9: gracefully shutdown reporter

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on pull request #9:
URL: https://github.com/apache/skywalking-rust/pull/9#issuecomment-1012694276


   @tisonkun Please rename the title to make the changes clear.


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



[GitHub] [skywalking-rust] codecov-commenter edited a comment on pull request #9: self-contained example & gracefully shutdown reporter

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #9:
URL: https://github.com/apache/skywalking-rust/pull/9#issuecomment-1008507190


   # [Codecov](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#9](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (89848ac) into [master](https://codecov.io/gh/apache/skywalking-rust/commit/1465d9fc6811dcb009e75f5c1dd2d5b1ef7a52a9?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (1465d9f) will **decrease** coverage by `3.44%`.
   > The diff coverage is `7.69%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/skywalking-rust/pull/9/graphs/tree.svg?width=650&height=150&src=pr&token=F7BQW5GURE&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master       #9      +/-   ##
   ==========================================
   - Coverage   88.60%   85.15%   -3.45%     
   ==========================================
     Files           9        9              
     Lines         272      283      +11     
   ==========================================
     Hits          241      241              
   - Misses         31       42      +11     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [src/context/trace\_context.rs](https://codecov.io/gh/apache/skywalking-rust/pull/9/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL2NvbnRleHQvdHJhY2VfY29udGV4dC5ycw==) | `69.81% <0.00%> (-6.48%)` | :arrow_down: |
   | [src/reporter/grpc.rs](https://codecov.io/gh/apache/skywalking-rust/pull/9/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL3JlcG9ydGVyL2dycGMucnM=) | `0.00% <0.00%> (ø)` | |
   | [src/context/propagation/encoder.rs](https://codecov.io/gh/apache/skywalking-rust/pull/9/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL2NvbnRleHQvcHJvcGFnYXRpb24vZW5jb2Rlci5ycw==) | `100.00% <100.00%> (ø)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [1465d9f...89848ac](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


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



[GitHub] [skywalking-rust] codecov-commenter edited a comment on pull request #9: gracefully shutdown reporter

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #9:
URL: https://github.com/apache/skywalking-rust/pull/9#issuecomment-1008507190


   # [Codecov](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#9](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (89b76bf) into [master](https://codecov.io/gh/apache/skywalking-rust/commit/1465d9fc6811dcb009e75f5c1dd2d5b1ef7a52a9?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (1465d9f) will **decrease** coverage by `3.44%`.
   > The diff coverage is `7.69%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/skywalking-rust/pull/9/graphs/tree.svg?width=650&height=150&src=pr&token=F7BQW5GURE&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master       #9      +/-   ##
   ==========================================
   - Coverage   88.60%   85.15%   -3.45%     
   ==========================================
     Files           9        9              
     Lines         272      283      +11     
   ==========================================
     Hits          241      241              
   - Misses         31       42      +11     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [src/context/trace\_context.rs](https://codecov.io/gh/apache/skywalking-rust/pull/9/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL2NvbnRleHQvdHJhY2VfY29udGV4dC5ycw==) | `69.81% <0.00%> (-6.48%)` | :arrow_down: |
   | [src/reporter/grpc.rs](https://codecov.io/gh/apache/skywalking-rust/pull/9/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL3JlcG9ydGVyL2dycGMucnM=) | `0.00% <0.00%> (ø)` | |
   | [src/context/propagation/encoder.rs](https://codecov.io/gh/apache/skywalking-rust/pull/9/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL2NvbnRleHQvcHJvcGFnYXRpb24vZW5jb2Rlci5ycw==) | `100.00% <100.00%> (ø)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [1465d9f...89b76bf](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


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



[GitHub] [skywalking-rust] tisonkun commented on a change in pull request #9: self-contained example & gracefully shutdown reporter

Posted by GitBox <gi...@apache.org>.
tisonkun commented on a change in pull request #9:
URL: https://github.com/apache/skywalking-rust/pull/9#discussion_r780924550



##########
File path: examples/simple_trace_report.rs
##########
@@ -1,14 +1,67 @@
+use std::error::Error;

Review comment:
       Yes. Let me try to build an e2e test for it.




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



[GitHub] [skywalking-rust] tisonkun commented on pull request #9: gracefully shutdown reporter

Posted by GitBox <gi...@apache.org>.
tisonkun commented on pull request #9:
URL: https://github.com/apache/skywalking-rust/pull/9#issuecomment-1008970692


   @wu-sheng @Shikugawa I can try to fix and verify e2e failure locally, but it seems our CI doesn't check the e2e test. Shall we add it also?


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



[GitHub] [skywalking-rust] wu-sheng commented on pull request #9: self-contained example & gracefully shutdown reporter

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on pull request #9:
URL: https://github.com/apache/skywalking-rust/pull/9#issuecomment-1008517981


   This is how the test thing works, https://github.com/SkyAPM/cpp2sky/blob/main/.github/workflows/main.yml


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



[GitHub] [skywalking-rust] Shikugawa edited a comment on pull request #9: self-contained example & gracefully shutdown reporter

Posted by GitBox <gi...@apache.org>.
Shikugawa edited a comment on pull request #9:
URL: https://github.com/apache/skywalking-rust/pull/9#issuecomment-1008545344


   @tisonkun Thank you for awesome contribution! If you are interested in e2e framework, you should see [here](https://github.com/Shikugawa/rs2sky/blob/main/.github/workflows/main.yml#L25-L36) (This is my experimental work of e2e, but it is not ready for production). It may help you.


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



[GitHub] [skywalking-rust] codecov-commenter edited a comment on pull request #9: gracefully shutdown reporter

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #9:
URL: https://github.com/apache/skywalking-rust/pull/9#issuecomment-1008507190


   # [Codecov](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#9](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (bc855b3) into [master](https://codecov.io/gh/apache/skywalking-rust/commit/1465d9fc6811dcb009e75f5c1dd2d5b1ef7a52a9?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (1465d9f) will **decrease** coverage by `3.44%`.
   > The diff coverage is `7.69%`.
   
   > :exclamation: Current head bc855b3 differs from pull request most recent head b8fc551. Consider uploading reports for the commit b8fc551 to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/skywalking-rust/pull/9/graphs/tree.svg?width=650&height=150&src=pr&token=F7BQW5GURE&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master       #9      +/-   ##
   ==========================================
   - Coverage   88.60%   85.15%   -3.45%     
   ==========================================
     Files           9        9              
     Lines         272      283      +11     
   ==========================================
     Hits          241      241              
   - Misses         31       42      +11     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [src/context/trace\_context.rs](https://codecov.io/gh/apache/skywalking-rust/pull/9/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL2NvbnRleHQvdHJhY2VfY29udGV4dC5ycw==) | `69.81% <0.00%> (-6.48%)` | :arrow_down: |
   | [src/reporter/grpc.rs](https://codecov.io/gh/apache/skywalking-rust/pull/9/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL3JlcG9ydGVyL2dycGMucnM=) | `0.00% <0.00%> (ø)` | |
   | [src/context/propagation/encoder.rs](https://codecov.io/gh/apache/skywalking-rust/pull/9/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL2NvbnRleHQvcHJvcGFnYXRpb24vZW5jb2Rlci5ycw==) | `100.00% <100.00%> (ø)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [1465d9f...b8fc551](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


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



[GitHub] [skywalking-rust] tisonkun commented on pull request #9: self-contained example & gracefully shutdown reporter

Posted by GitBox <gi...@apache.org>.
tisonkun commented on pull request #9:
URL: https://github.com/apache/skywalking-rust/pull/9#issuecomment-1008683945


   > Also, your change will break e2e code here.
   
   All checks have passed in CI. How do I verify this sentence?


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



[GitHub] [skywalking-rust] codecov-commenter edited a comment on pull request #9: gracefully shutdown reporter

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #9:
URL: https://github.com/apache/skywalking-rust/pull/9#issuecomment-1008507190


   # [Codecov](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#9](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (b21e2f4) into [master](https://codecov.io/gh/apache/skywalking-rust/commit/1465d9fc6811dcb009e75f5c1dd2d5b1ef7a52a9?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (1465d9f) will **decrease** coverage by `3.44%`.
   > The diff coverage is `7.69%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/skywalking-rust/pull/9/graphs/tree.svg?width=650&height=150&src=pr&token=F7BQW5GURE&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master       #9      +/-   ##
   ==========================================
   - Coverage   88.60%   85.15%   -3.45%     
   ==========================================
     Files           9        9              
     Lines         272      283      +11     
   ==========================================
     Hits          241      241              
   - Misses         31       42      +11     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [src/context/trace\_context.rs](https://codecov.io/gh/apache/skywalking-rust/pull/9/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL2NvbnRleHQvdHJhY2VfY29udGV4dC5ycw==) | `69.81% <0.00%> (-6.48%)` | :arrow_down: |
   | [src/reporter/grpc.rs](https://codecov.io/gh/apache/skywalking-rust/pull/9/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL3JlcG9ydGVyL2dycGMucnM=) | `0.00% <0.00%> (ø)` | |
   | [src/context/propagation/encoder.rs](https://codecov.io/gh/apache/skywalking-rust/pull/9/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL2NvbnRleHQvcHJvcGFnYXRpb24vZW5jb2Rlci5ycw==) | `100.00% <100.00%> (ø)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [1465d9f...b21e2f4](https://codecov.io/gh/apache/skywalking-rust/pull/9?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


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



[GitHub] [skywalking-rust] wu-sheng commented on a change in pull request #9: gracefully shutdown reporter

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on a change in pull request #9:
URL: https://github.com/apache/skywalking-rust/pull/9#discussion_r784428318



##########
File path: .github/workflows/e2e.yml
##########
@@ -0,0 +1,25 @@
+name: agent-test-tool
+
+on:
+  pull_request:
+  push:
+    branches:
+      - master
+    tags:
+      - 'v*'
+
+jobs:
+  e2e-rust:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v2
+        with:
+          submodules: recursive
+      - name: Prepare service container
+        run: docker-compose -f docker-compose.e2e.yml up --build -d
+      - name: Run e2e
+        run: |
+          pip3 install --upgrade pip
+          pip3 install setuptools
+          pip3 install -r requirements.txt
+          python3 tests/e2e/run_e2e.py --expected_file=tests/e2e/data/expected_context.yaml --max_retry_times=3 --target_path=/ping

Review comment:
       I can't find the `tests/e2e/data/expected_context.yaml`. How does this test pass? Could you check the logs?
   Is this a `run_e2e.py` bug or something?




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



[GitHub] [skywalking-rust] kezhenxu94 commented on pull request #9: gracefully shutdown reporter

Posted by GitBox <gi...@apache.org>.
kezhenxu94 commented on pull request #9:
URL: https://github.com/apache/skywalking-rust/pull/9#issuecomment-1012219130


   > It seems that `depends_on` doesn't take effect and consumer/producer runs before collector and panic...I don't know how to process then. If I manually start service parts one by one, the test can pass.
   
   depends_on should take effects, what is out of expectation is that consumer/provider tris to do something that OAP is not yet ready. Please use 
   
   ```yaml
   depends_on:
     oap:
       condition: service_healthy
   ```
   
   And add a health check for OAP. 
   
   NOTE: version 3.7 of docker compose file might not accept this syntax but I know 3.8 and 2.1 can. 


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



[GitHub] [skywalking-rust] tisonkun edited a comment on pull request #9: gracefully shutdown reporter

Posted by GitBox <gi...@apache.org>.
tisonkun edited a comment on pull request #9:
URL: https://github.com/apache/skywalking-rust/pull/9#issuecomment-1012277184


   Finally I hack through it.
   
   I think this is ready for review, ~~but I still confuse why https://github.com/apache/skywalking-rust/pull/9/commits/bbda7cfc539dfecf71254f2db0ad16fe51caa1c7 causes hanging forever :(~~ EDIT: I use a slim container which doesn't have a `curl` installed >_<


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



[GitHub] [skywalking-rust] wu-sheng commented on pull request #9: gracefully shutdown reporter & add agent-test-tool based e2e case

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on pull request #9:
URL: https://github.com/apache/skywalking-rust/pull/9#issuecomment-1013209531


   I got a notification that e2e of merged commit has failed in 9s after e2e began. 
   It makes me feel the health check seems not working well.
   I rerun the test, and will see whether it could pass.


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



[GitHub] [skywalking-rust] wu-sheng commented on pull request #9: gracefully shutdown reporter

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on pull request #9:
URL: https://github.com/apache/skywalking-rust/pull/9#issuecomment-1012691433


   @Shikugawa Please check the codes.


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