-
-
Notifications
You must be signed in to change notification settings - Fork 419
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* reset telemetry stuff in tests so they are always stopped * allow logging telemetry thread stuff but don't in specs * enforce minimum seconds around communication via polling or telemetry
- Loading branch information
1 parent
838f5a6
commit d8e85fa
Showing
7 changed files
with
166 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
require "delegate" | ||
|
||
module Flipper | ||
module Cloud | ||
class Telemetry | ||
class Instrumenter < SimpleDelegator | ||
def initialize(cloud_configuration, instrumenter) | ||
super cloud_configuration | ||
@instrumenter = instrumenter | ||
end | ||
|
||
def instrument(name, payload = {}, &block) | ||
return_value = @instrumenter.instrument(name, payload, &block) | ||
config.telemetry.record(name, payload) | ||
return_value | ||
end | ||
|
||
private | ||
|
||
# Flipper::Cloud::Configuration instance passed to this instrumenter. | ||
def config | ||
__getobj__ | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.