Skip to content

Commit

Permalink
squash: fix messaging id
Browse files Browse the repository at this point in the history
  • Loading branch information
arielvalentin committed Nov 21, 2023
1 parent e3e096c commit 071dc7a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion instrumentation/active_job/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Attributes that are specific to this instrumentation are recorded under `messagi

| Attribute Name | Type | Notes |
| - | - | - |
| `messaging.active_job.provider_job_id` | String | |
| `messaging.message.id` | String | |
| `messaging.active_job.priority` | Integer | |

## Differences between ActiveJob versions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def call(payload)
'messaging.system' => job.class.queue_adapter_name,
'messaging.destination' => job.queue_name,
'messaging.message.id' => job.job_id,
'messaging.active_job.provider_job_id' => job.provider_job_id.to_s
'messaging.message.id' => job.provider_job_id.to_s
}

# This can be problematic if programs use invalid attribute types like Symbols for priority instead of using Integers.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
_(span.attributes['messaging.active_job.priority']).must_be_nil
end

_(publish_span.attributes['messaging.active_job.provider_job_id']).must_equal('')
_(process_span.attributes['messaging.active_job.provider_job_id']).must_equal(job.provider_job_id)
_(publish_span.attributes['messaging.message.id']).must_equal('')
_(process_span.attributes['messaging.message.id']).must_equal(job.provider_job_id)
end

it 'tracks the job priority' do
Expand Down

0 comments on commit 071dc7a

Please sign in to comment.