Method: PlainApm::Extensions::Context::ActiveJob#serialize
- Defined in:
- lib/plain_apm/extensions/context/active_job.rb
#serialize ⇒ Object
TODO: would it be useful to de-serialize the whole context (e.g. user IDs, subscriptions, etc?)
12 13 14 15 16 17 |
# File 'lib/plain_apm/extensions/context/active_job.rb', line 12 def serialize trace_id = PlainApm::Extensions::Context.trace_id || SecureRandom.uuid # Rails wasn't preserving the nano-time, this has now been fixed # upstream in #39698 and fixed in Rails 7.1. super.update("trace_id" => trace_id, "enqueued_at" => Time.now.utc.iso8601(9)) end |