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

to use proxy for rollbar monitoring #119

Merged
merged 4 commits into from Nov 7, 2017
Merged

to use proxy for rollbar monitoring #119

merged 4 commits into from Nov 7, 2017

Conversation

weiweishi
Copy link
Contributor

To configure rollbar to use proxy.

host: options[:rollbar_proxy_host],
port: options[:rollbar_proxy_port]
}

Choose a reason for hiding this comment

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

Layout/EmptyLinesAroundBlockBody: Extra empty line detected at block body end. (https://github.com/bbatsov/ruby-style-guide#empty-lines-around-bodies)

@weiweishi weiweishi requested a review from murny November 3, 2017 21:52
@@ -17,6 +17,8 @@ process_name: pushmi_pullyu
queue_name: dev:pmpy_queue
minimum_age: 0
rollbar_token: 'abc123xyz'
rollbar_proxy_host: 'your_proxy_host_url'
Copy link
Collaborator

@murny murny Nov 3, 2017

Choose a reason for hiding this comment

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

Wondering if it be better to name space rollbar now? like the rest?

rollbar: 
  token: 'etc'
  proxy_host: 'etc'
  proxy_url: 'etc

Also might not hurt to write a test to make sure these are being set accordingly? (copy and paste the rollbar_token test if you want)

@@ -58,6 +58,10 @@ def configure_rollbar
Rollbar.configure do |config|
config.enabled = false unless options[:rollbar_token].present?
config.access_token = options[:rollbar_token]
config.proxy = {
host: options[:rollbar_proxy_host],
Copy link
Collaborator

Choose a reason for hiding this comment

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

assuming rollbar still works if these are nils and just doesnt use proxy?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the spec test still passes, without the two values set up in fixtures/config.yml, so it should be working without the proxy values

Copy link
Collaborator

@murny murny Nov 3, 2017

Choose a reason for hiding this comment

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

Well the spec test literally just checks if the config file gets read and initializes the option hash. Doesn't actually test if rollbar gets configured or working i don't think. Haven't read into rollbar. I'm assuming it works (if it does this is fine)? Or maybe it doesn't (then we need to do a present check or something) ? ¯\(ツ)

@@ -225,7 +229,7 @@ def shutdown
exit!(1)
else
# using stderr instead of logger as it uses an underlying mutex which is not allowed inside trap contexts.
$stderr.puts 'Exiting... Interrupt again to force quit.'
warn 'Exiting... Interrupt again to force quit.'
Copy link
Collaborator

Choose a reason for hiding this comment

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

theres a test that makes this fail. Requiring updating it. Look at travisCI build

Copy link
Collaborator

@murny murny Nov 3, 2017

Choose a reason for hiding this comment

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

Take a peak at changing the test to using these maybe?

https://relishapp.com/rspec/rspec-expectations/docs/built-in-matchers/output-matcher

Doc has examples with warn

@weiweishi
Copy link
Contributor Author

weiweishi commented Nov 3, 2017 via email

Copy link
Collaborator

@murny murny left a comment

Choose a reason for hiding this comment

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

👍 🥇

@weiweishi
Copy link
Contributor Author

thanks @murny

@weiweishi weiweishi merged commit bb732b6 into master Nov 7, 2017
@murny murny deleted the rollbar_proxy branch November 7, 2017 17:20
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.

None yet

3 participants