Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken subscribe interface #253

Open
orien opened this issue Sep 4, 2019 · 1 comment

Comments

@orien
Copy link

commented Sep 4, 2019

Following the monitoring instructions in the readme:

# `event` is `success`, `busy`, `circuit_open`.
# `resource` is the `Semian::Resource` object
# `scope` is `connection` or `query` (others can be instrumented too from the adapter)
# `adapter` is the name of the adapter (mysql2, redis, ..)
Semian.subscribe do |event, resource, scope, adapter|
  StatsD.increment("Shopify.#{adapter}.semian.#{event}", 1, tags: [
    "resource:#{resource.name}",
    "total_tickets:#{resource.tickets}",
    "type:#{scope}",
  ])
end

Results in an Error:

NoMethodError: undefined method `tickets' for #<Semian::CircuitBreaker:0x0000558e2ec77ba0>

It seems the resource is a Semian::CircuitBreaker, and not a Semian::Resource!

Introduced by: #238

Semian Version: 0.8.9

@orien

This comment has been minimized.

Copy link
Author

commented Sep 4, 2019

Referencing the new notification features (#238) in the Changelog would be much appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.