Skip to content

Allow nesting of background span #10

@RedX2501

Description

@RedX2501

I was not able to make otel-cli span background nest.

This is a very simple example in my real script the calls happen in a nested fashion.

local_otel_run() {
    local span_function="$1"
    shift
    local cli_sockdir="$(mktemp -d)"
    otel-cli span background --name "$span_function" --verbose --tp-required --sockdir "$cli_sockdir" &
    "$span_function" "$@"
    otel-cli span end --sockdir "$cli_sockdir"
}

main(){
   local_otel_run command1
   local_otel_run command2
   local_otel_run command3
}

local_otel_run main

In the logs in Jaeger the main function does not have spans for command1, 2, and 3 displayed nested they are siblings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions