Skip to content

Commit d25c174

Browse files
committed
Update the Oban test suite to match the spec
1 parent e654f0e commit d25c174

File tree

1 file changed

+15
-19
lines changed

1 file changed

+15
-19
lines changed

instrumentation/opentelemetry_oban/test/opentelemetry_oban_test.exs

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,12 @@ defmodule OpentelemetryObanTest do
4545
)}
4646

4747
assert %{
48-
"messaging.destination": "events",
49-
"messaging.destination_kind": :queue,
48+
"messaging.destination.name": "events",
49+
"messaging.system": :oban,
5050
"oban.job.job_id": _job_id,
5151
"oban.job.max_attempts": 1,
5252
"oban.job.priority": 0,
53-
"oban.job.worker": "TestJob",
54-
"messaging.system": :oban
53+
"oban.job.worker": "TestJob"
5554
} = :otel_attributes.map(attributes)
5655
end
5756

@@ -145,17 +144,16 @@ defmodule OpentelemetryObanTest do
145144
)}
146145

147146
assert %{
148-
"messaging.destination": "events",
149-
"messaging.destination_kind": :queue,
147+
"messaging.destination.name": "events",
148+
"messaging.operation.type": :process,
149+
"messaging.system": :oban,
150150
"oban.job.attempt": 1,
151151
"oban.job.inserted_at": _inserted_at,
152152
"oban.job.job_id": _job_id,
153153
"oban.job.max_attempts": 1,
154154
"oban.job.priority": 0,
155155
"oban.job.scheduled_at": _scheduled_at,
156-
"oban.job.worker": "TestJob",
157-
"messaging.operation": :process,
158-
"messaging.system": :oban
156+
"oban.job.worker": "TestJob"
159157
} = :otel_attributes.map(attributes)
160158
end
161159

@@ -175,17 +173,16 @@ defmodule OpentelemetryObanTest do
175173
)}
176174

177175
assert %{
178-
"messaging.destination": "events",
179-
"messaging.destination_kind": :queue,
176+
"messaging.destination.name": "events",
177+
"messaging.operation.type": :process,
178+
"messaging.system": :oban,
180179
"oban.job.attempt": 1,
181180
"oban.job.inserted_at": _inserted_at,
182181
"oban.job.job_id": _job_id,
183182
"oban.job.max_attempts": 1,
184183
"oban.job.priority": 0,
185184
"oban.job.scheduled_at": _scheduled_at,
186-
"oban.job.worker": "TestJobThatReturnsError",
187-
"messaging.operation": :process,
188-
"messaging.system": :oban
185+
"oban.job.worker": "TestJobThatReturnsError"
189186
} = :otel_attributes.map(attributes)
190187

191188
[
@@ -253,17 +250,16 @@ defmodule OpentelemetryObanTest do
253250
)}
254251

255252
assert %{
256-
"messaging.destination": "events",
257-
"messaging.destination_kind": :queue,
253+
"messaging.destination.name": "events",
254+
"messaging.operation.type": :process,
255+
"messaging.system": :oban,
258256
"oban.job.attempt": 1,
259257
"oban.job.inserted_at": _inserted_at,
260258
"oban.job.job_id": _job_id,
261259
"oban.job.max_attempts": 1,
262260
"oban.job.priority": 0,
263261
"oban.job.scheduled_at": _scheduled_at,
264-
"oban.job.worker": "TestJobThatThrowsException",
265-
"messaging.operation": :process,
266-
"messaging.system": :oban
262+
"oban.job.worker": "TestJobThatThrowsException"
267263
} = :otel_attributes.map(attributes)
268264

269265
[

0 commit comments

Comments
 (0)