Skip to content
This repository was archived by the owner on Jul 31, 2023. It is now read-only.
This repository was archived by the owner on Jul 31, 2023. It is now read-only.

how to tracing the operation between two processes #232

Open

Description

@chiaqi

i have such a scene to trace: process_a send data to process_b, I need to track the entire process of sending data until it is accepted by process_b. the two process communicate with share memory.
now create root_span at process_a and sent the Spancontext to process_b, and create child_span with root_span's SpanContext .but this still can't track the process of delivery. i want to end the root_span in process_b, but how to do this?

Anyone knows the solution to solve this problems, thank you!!

Activity

  1. billowqiu commented on Oct 30, 2018

    @billowqiu

    既然是process_a创建的root_span,为啥不是自己finish呢?

  2. bogdandrutu commented on Oct 30, 2018

    @bogdandrutu

    @chiaqi we do not encourage this behavior of sharing spans between process, and we suggest to have 2 different spans:

    1. Process_A starts a root spans and end the span when the RPC/HTTP call is finished (in your case when the message is added in the shared memory if there is no way to wait for the message to be delivered to Process_B).
    2. Process_B start a child span (child of the root span created in Process_A and propagated via the shared memory using the SpanContext). This Span can start when Process_B sees the message and ended when Process_B finishes to process the received message (similar with an RPC).

    You can see the "delivery" time as the difference root_span.start_time - child_span.start_time.

    Does this answer your question, let me know if this does not work and I can try to help more.

  3. chiaqi commented on Oct 31, 2018

    @chiaqi
    Author

    @bogdandrutu thanks for your answer
    I can see the delivery time , but how to intuitively display it on the stackdriver?
    Is there a better solution for this scenario?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions