-
Notifications
You must be signed in to change notification settings - Fork 0
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
[WIP] fix honeybadger config #50
base: master
Are you sure you want to change the base?
Conversation
… come from Application.xml) for honeybadger config * SulWowza.java: move registerUncaughtExceptionHandler() and initNoticeReporter() into initHoneybadger. initHoneybadger takes IApplicationInstance instance so it can get application properties. * TestSulWowza.java: adjust mocking for switch to application properties from env vars. * Application.xml: example honeybadger config properties * TestParsingFromRequestInfo.java, TestValidationMethods.java, TestVerifyStacksToken.java: remove unnecessary test setup.
Coverage decreased (-1.4%) to 95.909% when pulling 474491ed9d415db3a2ce7f1f9fa54c002e805171 on 46-fix-honeybadger-config into 3ad1703 on master. |
…ay (would have to do something like )
… the values it needs using its default property names from the Application.xml specified properties
474491e
to
51c9a18
Compare
maybe 2 days |
I think this PR is good to go, having discussed it with @ndushay - the TODO list above looks complete, so it should just be a question of following that recipe. |
Testing procedure:
An easy way to test that Honeybadger errors are reported would be to "sabotage" the Application.xml file to e.g. change the Stacks callback URL to start with |
Note: I've found that uncaught exceptions don't seem to get reported to Honeybadger, despite the code in However, this PR still represent a great improvement over what we have now, so I think it should be merged and deployed to production per the steps above. |
System.getenv()
: i suspect this is a JVM security manager restriction or something, but you have to write another wowza module that implementsIServerNotify
and gets compiled into a JAR and enabled in Server.xml. that seemed like a lot of new configuration and testing when we can already put private custom settings in Application.xml. the only reason for using environment variables initially was that the Honeybadger docs made it seem like that'd be the easiest way for its config machinery to pick up settings (see https://github.com/honeybadger-io/honeybadger-java#advanced-configuration).doReturn(...).when(spyModule).method()
, instead of the usualwhen(spyModule.method()).thenReturn(...)
. this is because by default, the latter approach will call out to the actual method on thespyModule
instance, whereas thedoReturn
approach will just return the mock result w/o calling the underlying method. in the cases wheredoReturn
was used, calling out to the actual method caused errors, and was running code that wasn't the point of the test in question anyway.so, if this looks like a reasonable approach, i think this is the TODO list:
conf/version
file, tag the new version.lib/
directory together with the dlss-wowza jar file (on prod only, since we probably don't want alerts for the staging environment) -honeybadger-java-1.1.0.jar
since we're so close to winter break, i'd propose holding off on the actual deployment even if this all looks fine as-is and has no problems with testing, though i suspect there will be feedback on this and a possible lack of time to deploy and test anyway. still, it'd be nice to get feedback on what's here.
sorry that this seemingly simple error reporting implementation has become a bit of a quagmire!