Skip to content

Instrument statesman for easy hook into from monitoring tools - #489

Open
theaxel wants to merge 4 commits into
gocardless:masterfrom
theaxel:feature/instrument-statesman
Open

Instrument statesman for easy hook into from monitoring tools#489
theaxel wants to merge 4 commits into
gocardless:masterfrom
theaxel:feature/instrument-statesman

Conversation

@theaxel

@theaxel theaxel commented Jan 17, 2023

Copy link
Copy Markdown

This PR addresses the issue described in #486 by adding ActiveSupport instrumentation for guards, callbacks and transitions.
Will add some testing if this looks right.

@theaxel
theaxel marked this pull request as ready for review January 18, 2023 08:25
@theaxel theaxel changed the title Feature/instrument statesman Instrument statesman for easy hook into from monitoring tools Jan 19, 2023
Comment thread lib/statesman/callback.rb
callback.call(*args)
ActiveSupport::Notifications.instrument "callback.statesman", {
subject: args.first.class.name,
subject_id: args.first.id,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we be sure these will always respond to id?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants