holochain / lib3h

The lib3h p2p communication rust library.
Apache License 2.0
44 stars 5 forks source link

Workings spans in Lib3h #498

Closed ddd-mtl closed 5 years ago

ddd-mtl commented 5 years ago

Added a LIB3H_TRACER singleton and removed all fixme() and todos() to something useful when appropriate (some spans might still be a bit off but since ghost actor is going to change I don't see the point in making this perfect at this stage) Added console reporting to engine test and integration test

example:

[(root) client_to_lib3h event] 
    [handle PublishEntry] 
        [request Lib3hToClient::HandleStoreEntryAspect] 
        !event! RequestId("billyRO0YRGMx4BtnSmSCImbyl")
            [bookmark] 
        [handle_RequestToChild] 
        [handle_dht_RequestToChild] 
            [handle_request_from_parent] 
            [DhtRequestToChild::BroadcastEntry] 
                [handle_dht_RequestToParent] 
                    [handle_space_request] 
                        [handle_GossipTo] 
                            [Transport Transport::SendMessage] 
                                [handle_RequestToChild] 
                                    [send_with_partial_high_uri] 
                                        [SendWithFullLowUri] 
                                            [request RequestToChild::EncodePayload] 
                                            !event! RequestId("gateway_to_message_encoding_mpIBeCkRkWtxWzhI73GBZ")
                                                [bookmark] 
                                                [send request] 
                                            [request RequestToChild::SendMessage] 
                                            !event! RequestId("gateway_to_child_transport_F5plamn6RyPGAH0Hn6Mho")
                                                [bookmark] 
                                                [send request] 
                                                    [TransportEndpointAsActor::process_concrete, self] 
                                                    !event! RequestId("~46IHev9TUSc7PZpyJqRW")
                                                        [bookmark] 
                                                        [send request] 
                                                            [request GatewayRequestToChild::Transport::SendMessage] 
                                                            !event! RequestId("mplex_to_inner_gateway_FgNA60ek8fEw94feGMkG4")
                                                                [bookmark] 
                                                                [send request] 
                                                                    [handle_RequestToChild] 
                                                                        [send_with_partial_high_uri] 
                                                                            [dht::RequestPeer] 
                                                                            !event! RequestId("gateway_dht_wlxfZNTP5XZmvUUEExnsN")
                                                                                [bookmark] 
                                                                                [send request] 
                                                                                    [handle_request_from_parent] 
                                                                            [SendWithFullLowUri] 
                                                                                [request RequestToChild::EncodePayload] 
                                                                                !event! RequestId("gateway_to_message_encoding_W8aZK4T8lSKfIgkQfW3Db")
                                                                                    [bookmark] 
                                                                                    [send request] 
                                                                                [request RequestToChild::SendMessage] 
                                                                                !event! RequestId("gateway_to_child_transport_ekKxyAjt16u1wkjDDR8Ye")
                                                                                    [bookmark] 
                                                                                    [send request] 
                                                                                        [process_concrete] 
                                                                                        !event! SendMessage to 'mem://addr_1/'
                                        [dht::RequestPeer] 
                                        !event! RequestId("gateway_dht_rP5~AHWrXB2JmGIJQgeDm")
                                            [bookmark] 
                                            [send request] 
                                                [handle_request_from_parent]