-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit adds logging when a client is rate throttled. It emits a log to stdout by default and there is a configurable logging block that is made available so that developers can push to a custom endpoint such as honeycomb. Co-authored-by: Lola Odelola <damzcodes@gmail.com>
- Loading branch information
1 parent
d414514
commit e1bdf88
Showing
5 changed files
with
56 additions
and
8 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 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 |
---|---|---|
@@ -1,11 +1,22 @@ | ||
require 'heroics' | ||
require 'moneta' | ||
|
||
require_relative '../config/client-config' | ||
# Ruby HTTP client for the Heroku API. | ||
module PlatformAPI | ||
def self.rate_throttle=(rate_throttle) | ||
@rate_throttle = rate_throttle | ||
end | ||
|
||
# Get access to the rate throttling class object for configuration. | ||
# | ||
# @return [PlatformAPI::HerokuClientThrottle] | ||
def self.rate_throttle | ||
@rate_throttle | ||
end | ||
end | ||
|
||
require_relative '../config/client-config' | ||
|
||
require 'platform-api/client' | ||
require 'platform-api/version' | ||
require 'platform-api/heroku_client_throttle' |
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