Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local Spans don't render correctly in Zipkin UI #155

Open
aachinfiev opened this issue Oct 28, 2017 · 2 comments
Open

Local Spans don't render correctly in Zipkin UI #155

aachinfiev opened this issue Oct 28, 2017 · 2 comments

Comments

@aachinfiev
Copy link

aachinfiev commented Oct 28, 2017

This is a follow up based on Gitter chat with @adriancole

I have tested new release v1.1.0 which has corrected local span processing that @fedj put together. There is still an issue in how spans end up displayed in zipkin UI.

Sample code:

            var trace = m.Trace.Child();
            trace.Record(Annotations.ServerRecv());
            trace.Record(Annotations.ServiceName("child"));
            trace.Record(Annotations.Rpc("play"));
            Task.Delay(50).Wait();
            var local = trace.Child();
            local.Record(Annotations.LocalOperationStart("child-playing"));
            Task.Delay(100).Wait();
            local.Record(Annotations.LocalOperationStop());
            Task.Delay(70).Wait();

Shows up as:
image

Server receives

[
    {
        "id": "14cfe1b594cf86e7",
        "name": "UnknownRpc",
        "binaryAnnotations": [
            {
                "key": "lc",
                "value": "child-playing",
                "endpoint": {
                    "ipv4": "-1062730697",
                    "port": "0",
                    "serviceName": ""
                }
            }
        ],
        "debug":False,
        "traceId": "6810abc3970a40dd",
        "timestamp": "1509149747045620",
        "duration": "108010",
        "parentId": "da12fcb02e772456"
    }
]

If I add RPC name as

            var local = trace.Child();
            local.Record(Annotations.Rpc("child-local"));
            local.Record(Annotations.LocalOperationStart("child-playing"));

Then it will show as

image

Server receives:

[
    {
        "id": "67a4860d7886cc8f",
        "name": "child-local",
        "binaryAnnotations": [
            {
                "key": "lc",
                "value": "child-playing",
                "endpoint": {
                    "ipv4": "-1062730697",
                    "port": "0",
                    "serviceName": ""
                }
            }
        ],
        "debug":False,
        "traceId": "5af6412661f3dddf",
        "timestamp": "1509150439885897",
        "duration": "1499149",
        "parentId": "13ea891fab7bc483"
    }
]

However it still doesn't look right. I think it should do one of the following so the spans appear more informative.

Option 1 - Using local operation without RPC annotation

In this case either left side should state operation name and right side be empty and only contain duration. Or left side is empty and right side contains operation name.

Option 2 - Using local operation + RPC annotation

In this case left side can show RPC as it does now and right side should show local operation instead of unknown RPC.

Option 3 - Whatever else that might make sense for this local span display.

Thank you,

Alex

@Dan-Coleman
Copy link

Dan-Coleman commented Jan 31, 2019

Hi Alex,

Did you ever find the best solution for this? I can confirm I can get this to work by adding the RPC annotation but even if I then use the local operation stop/start then the timings are not detailed when you click on the span:
screen shot 2019-01-31 at 11 48 56

@codefromthecrypt
Copy link
Member

@sphinxy wondering if you have cycles to help support the project. this is an example of a problem that needs some help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants