Comments (7)
Why not only initialize when it's a release build? Here's an example:
https://github.com/JakeWharton/Telecine/blob/master/telecine/src/main/java/com/jakewharton/telecine/TelecineApplication.java
I don't want to use a crash reporting library that silently fails to
initialize.
On Thu, Jul 28, 2016, 6:57 AM Shaleen Jain [email protected] wrote:
Instead of throwing an NPE just log an error so that we can use the
library in an open source project without an api key and not get tons of
debug crashes from unknown sources.—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#114, or mute the
thread
https://github.com/notifications/unsubscribe-auth/AAEEEeWY-run1UobDmttasONp6Mj9NCaks5qaKdMgaJpZM4JXLvZ
.
from bugsnag-android.
Yes, but then you'd have to guard every other bugsnag static method as well. That's a lot of boilerplate.
It won't really be silent if it logs an error. Besides if you can't follow the setup instructions then you really shouldn't be using a crash reporting library. Their docs are pretty good. ;)
from bugsnag-android.
A log is effectively silent. And it's not incompetence I'm worried about,
it's accidental refactorings in code or the build config which will cause
the key to become absent and go unnoticed instead of instantly failing.
I don't find it unreasonable to guard your calls or use an abstraction. I
wouldn't expect an analytics library or payment SDK or social SDK to
silently do nothing either when a required piece of information was not
provided.
This library requires that piece of information for all functionality yet
it's your app that wants the ability to have a no-op implementation. It
doesn't seem right to force that onto the library then. If you want the
interface/implementation abstraction to be part of this library I think
that makes sense, but the no-op version does not seem appropriate.
On Sun, Jul 31, 2016, 3:14 AM Shaleen Jain [email protected] wrote:
Yes, but then you'd have to guard every other bugsnag static method as
well. That's a lot of boilerplate.It won't really be silent if it logs an error. Besides if you can't follow
the setup instructions then you really shouldn't be using a crash reporting
library. Their docs are pretty good. ;)—
You are receiving this because you commented.Reply to this email directly, view it on GitHub
#114 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAEEEdnftO90jHCkPh_ZzUNPO_IoJxvVks5qbEtLgaJpZM4JXLvZ
.
from bugsnag-android.
You can always write unit tests to catch regressions in your code.
Libraries should be plug-able and not create hard dependencies, I should be able to turn its functionality on/off without having to go through my entire code base just for testing or performance analysis.
For eg, Google Analytics doesn't crash your whole application if something isn't properly configured, even if that includes not adding the api key, instead it is flexible and lets the developer decide how to use the library including the ability to enable/disable it.
At the very least all the other bugsnag methods shouldn't throw an exception if bugsnag is initialized only on release builds.
from bugsnag-android.
Great. It sounds like you agree with me that the library should provide an
abstraction for your application requirements but not implement your
requirements directly.
On Sun, Jul 31, 2016, 4:35 AM Shaleen Jain [email protected] wrote:
You can always write unit tests to ensure your changes in code does not
cause regressions.Libraries should be plug-able and not create hard dependencies, I should
be able to turn its functionality on/off without having to go through my
entire code base just for testing or performance analysis.For eg, Google Analytics doesn't crash your whole application if something
isn't right even if you don't include the api key, instead it is flexible
and lets the developer decide how to use the library including the ability
to enable/disable it.At the very least all the other bugsnag methods shouldn't throw an
exception if bugsnag is initialized only on release builds.—
You are receiving this because you commented.Reply to this email directly, view it on GitHub
#114 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAEEEeCqfIIMoi2PdwtbAsvo9avggX2sks5qbF5UgaJpZM4JXLvZ
.
from bugsnag-android.
Yeah.
On Mon 1 Aug, 2016, 9:30 AM Jake Wharton, [email protected] wrote:
Great. It sounds like you agree with me that the library should provide an
abstraction for your application requirements but not implement your
requirements directly.On Sun, Jul 31, 2016, 4:35 AM Shaleen Jain [email protected]
wrote:You can always write unit tests to ensure your changes in code does not
cause regressions.Libraries should be plug-able and not create hard dependencies, I should
be able to turn its functionality on/off without having to go through my
entire code base just for testing or performance analysis.For eg, Google Analytics doesn't crash your whole application if
something
isn't right even if you don't include the api key, instead it is flexible
and lets the developer decide how to use the library including the
ability
to enable/disable it.At the very least all the other bugsnag methods shouldn't throw an
exception if bugsnag is initialized only on release builds.—
You are receiving this because you commented.Reply to this email directly, view it on GitHub
<
#114 (comment)
,
or mute the thread
<
https://github.com/notifications/unsubscribe-auth/AAEEEeCqfIIMoi2PdwtbAsvo9avggX2sks5qbF5UgaJpZM4JXLvZ.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#114 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADuexYtGHOH2FHAhXenrQOcOWyglDNTJks5qbW91gaJpZM4JXLvZ
.
from bugsnag-android.
I looked at a few possibilities for this issue, and I think the best solutions are ones which can be done already:
- Always set the API key and configure
notifyReleaseStages
to exclude debug builds. This is probably the easiest solution, as internally the Bugsnag client ignores any notification received when the configuredreleaseStage
is not present innotifyReleaseStages
. Committing the API key to an open source project has no data exposure consequences, as it is a write-only key and cannot be used to access the project’s data. - Conditionally configure Bugsnag within a wrapper. This is commonly done when Bugsnag is used along with other analytics/logging tools, and reduces overhead when tweaking the library usage as a whole.
from bugsnag-android.
Related Issues (20)
- Bugsnag Android Plugin crashes the app with SIGSEGV - Segmentation violation (invalid memory reference) HOT 4
- Invalid grouping of native crashes coming from a dynamic library HOT 6
- Bugsnag does not report All types of metadata for native crashes HOT 2
- String metadata is being trimmed to 63 characters (native crashes) HOT 1
- Timeout uploading mappings to bugsnag HOT 3
- ANR com.bugsnag.android.DataCollectionModule.getDeviceDataCollector HOT 2
- Help needed contributing HOT 1
- Gradle sync issues on applying com.bugsnag.android.gradle plugin HOT 2
- Why did you make DefaultDelivery as internal ? HOT 3
- BugSnag.isStarted() implementation isn't thread safe HOT 2
- Add ability to override/mock the Client HOT 7
- ANR in Bugsnag.start (ForegroundDetector.getProcessInfo) HOT 14
- ActivityBreadcrumbCollector surfaces the wrong activity previous state HOT 2
- SystemBroadcastReceiver throws SecurityException on Android 14 HOT 4
- System State Broadcasts Produce ANRs HOT 2
- Determining the full Source File Path for a Crash Report HOT 2
- Sending native map files failed HOT 3
- Support for Suppressed Exceptions HOT 1
- Client.leaveBreadcrumb is slow() HOT 3
- Any way to set a proxy only to the bugsnag instance? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bugsnag-android.