Skip to content

OpentelemetryOban.JobHandler - Trace - Parent Span being ignored #508

@linqueta

Description

@linqueta

Describe the bug
I have a piece of code where I have an OpenTelemetry Trace Span already in context, and I set them in the field meta to the following Oban Jobs. Once the Oban Jobs starts to process, it triggers OpentelemetryOban.JobHandler.handle_job_start/4, but it's ignoring a possible parent span, ignoring the three entirely (OpenTelemetry.Tracer.set_current_span(:undefined))

A simple change to OpenTelemetry.Tracer.set_current_span(parent) makes it work, having a parent or not.

Expected behavior
Respect the parent span passed into job_meta, calling to OpenTelemetry.Tracer.set_current_span(parent)

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions