8000 Feature Request: Allow @WithSpan to start a new Trace · Issue #1036 · open-telemetry/opentelemetry-java-instrumentation · GitHub
[go: up one dir, main page]

Skip to content

Feature Request: Allow @WithSpan to start a new Trace #1036

@jkwatson

Description

@jkwatson

Currently, if you use the @WithSpan annotation, it will always join in the current trace, if there is one in scope. It would be useful to be able to tell the agent that we don't want to preserve the parenting, but create a new TraceId for the span.

This can be useful if you want background jobs that are spawned based on a request to appear as their own trace, rather than joining in the existing trace.

Bonus points: an option to Link the new span to the one that spawned it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    contribution welcomeRequest makes sense, maintainers probably won't have time, contribution would be welcomeenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0