Skip to content

Commit

Permalink
Hardcode attribute keys to prevent deprecation errors
Browse files Browse the repository at this point in the history
  • Loading branch information
danschultzer committed Jan 9, 2025
1 parent a60f775 commit fda7ab9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions instrumentation/opentelemetry_oban/lib/opentelemetry_oban.ex
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,9 @@ defmodule OpentelemetryOban do
worker = Changeset.get_field(changeset, :worker)

%{
Trace.messaging_system() => :oban,
Trace.messaging_destination() => queue,
Trace.messaging_destination_kind() => :queue,
:"messaging.system" => :oban,
:"messaging.destination" => queue,
:"messaging.destination_kind" => :queue,
:"oban.job.worker" => worker
}
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ defmodule OpentelemetryOban.JobHandler do
OpenTelemetry.Tracer.set_current_span(:undefined)

attributes = %{
Trace.messaging_system() => :oban,
Trace.messaging_destination() => queue,
Trace.messaging_destination_kind() => :queue,
Trace.messaging_operation() => :process,
:"messaging.system" => :oban,
:"messaging.destination" => queue,
:"messaging.destination_kind" => :queue,
:"messaging.operation" => :process,
:"oban.job.job_id" => id,
:"oban.job.worker" => worker,
:"oban.job.priority" => priority,
Expand Down

0 comments on commit fda7ab9

Please sign in to comment.