Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ defmodule OpentelemetryOban.JobHandler do
:otel_propagator_text_map.extract(Map.to_list(job_meta))
parent = OpenTelemetry.Tracer.current_span_ctx()
links = if parent == :undefined, do: [], else: [OpenTelemetry.link(parent)]
OpenTelemetry.Tracer.set_current_span(:undefined)
OpenTelemetry.Tracer.set_current_span(parent)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC, I did it because we already create an Opentelemetry link. If we also set the parent, then we have both a link and a direct relationship. Can you link from the opentelemetry docs that this should not be a link?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand @indrekj , I'm not sure if it shouldn't be a link or not, I just evaluated how it was logged at Datadog, and I missed the parent in the whole tree of traces.
So, I don't have a solid argument to say if it should or not. In case not we can close the PR.


attributes = %{
Trace.messaging_system() => :oban,
Expand Down