Skip to content

Span is missing for those nodes that don't trigger the onComplete event #15

@sergimola

Description

@sergimola

Those nodes that don't trigger the onComplete event don't have a span.

I've seen it happening in those nodes that receive a network call and start a new Message, such as the tcp in node.
The http in also has the same behaviour (not triggering the onComplete event), but there is some code to handle it explicitly.
Another example of this problem is the server-events from node-red-contrib-home-assistant-websocket.

It can be easily reproduced with the following flow.

Flow
[
    {
        "id": "f902e7ec780ac4b2",
        "type": "tcp out",
        "z": "f6f2187d.f17ca8",
        "name": "",
        "host": "localhost",
        "port": "1234",
        "beserver": "client",
        "base64": false,
        "end": false,
        "tls": "",
        "x": 890,
        "y": 540,
        "wires": []
    },
    {
        "id": "4328fd4852f0f2cd",
        "type": "tcp in",
        "z": "f6f2187d.f17ca8",
        "name": "",
        "server": "server",
        "host": "",
        "port": "1234",
        "datamode": "stream",
        "datatype": "utf8",
        "newline": "",
        "topic": "",
        "trim": false,
        "base64": false,
        "tls": "",
        "x": 680,
        "y": 580,
        "wires": [
            [
                "50bcbab4f2f435c3"
            ]
        ]
    },
    {
        "id": "50bcbab4f2f435c3",
        "type": "debug",
        "z": "f6f2187d.f17ca8",
        "name": "debug 1",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 860,
        "y": 580,
        "wires": []
    },
    {
        "id": "65a08a2318bc4ca3",
        "type": "inject",
        "z": "f6f2187d.f17ca8",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "hello",
        "payloadType": "str",
        "x": 690,
        "y": 540,
        "wires": [
            [
                "f902e7ec780ac4b2"
            ]
        ]
    }
]

You'll get this: (only the parent span, not the child span)
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions