Skip to content

can't write unknown attribute start_timestamp during instrumentation #1573

@masterkain

Description

@masterkain

I got hit by a nasty bug that halted our callbacks pipeline that involves activesupport instrumentation.

ActiveModel::MissingAttributeError
can't write unknown attribute `start_timestamp`

simplified code follows.

model:

after_commit :process_creation, on: :create, if: ->(r) { r.persisted? }

def process_creation
  register_created_event
end

def register_created_event
  ActiveSupport::Notifications.instrument('media.created', self)
end

then we have a subscription method but it's not gonna be reached.

this is because of https://github.com/getsentry/sentry-ruby/blob/master/sentry-rails/lib/sentry/rails/tracing.rb#L40

Screenshot 2021-09-17 at 11 09 50

Metadata

Metadata

Assignees

No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions