Skip to content

Commit

Permalink
Add middleware to AnyCable RPC only when Yabeda is configured
Browse files Browse the repository at this point in the history
Fixes #2
  • Loading branch information
Envek committed Feb 15, 2022
1 parent e10e3d3 commit febcb24
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## [Unreleased]

### Changed

- Add instrumentation middleware to AnyCable RPC only when Yabeda is actually used (configured). See [issue №2](https://github.com/yabeda-rb/yabeda-anycable/issues/2)

## [0.1.0] - 2021-07-22

- Initial release with `anycable_rpc_call_count` and `anycable_rpc_call_runtime` metrics in an AnyCable middleware.
4 changes: 2 additions & 2 deletions lib/yabeda/anycable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ class Error < StandardError; end
].freeze

::AnyCable.configure_server do
::AnyCable.middleware.use(Middleware)

::Yabeda.configure do
::AnyCable.middleware.use(Middleware)

group :anycable

counter :rpc_call_count, tags: %i[method command status], comment: "RPC calls count"
Expand Down

0 comments on commit febcb24

Please sign in to comment.