File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -29,3 +29,39 @@ Raven.noConflict = function() {
2929Raven . afterLoad ( ) ;
3030
3131module . exports = Raven ;
32+
33+ /**
34+ * DISCLAIMER:
35+ *
36+ * Expose `Client` constructor for cases where user want to track multiple "sub-applications" in one larger app.
37+ * It's not meant to be used by a wide audience, so pleaaase make sure that you know what you're doing before using it.
38+ * Accidentally calling `install` multiple times, may result in an unexpected behavior that's very hard to debug.
39+ *
40+ * It's called `Client' to be in-line with Raven Node implementation.
41+ *
42+ * HOWTO:
43+ *
44+ * import Raven from 'raven-js';
45+ *
46+ * const someAppReporter = new Raven.Client();
47+ * const someOtherAppReporter = new Raven.Client();
48+ *
49+ * someAppReporter('__DSN__', {
50+ * ...config goes here
51+ * });
52+ *
53+ * someOtherAppReporter('__OTHER_DSN__', {
54+ * ...config goes here
55+ * });
56+ *
57+ * someAppReporter.captureMessage(...);
58+ * someAppReporter.captureException(...);
59+ * someAppReporter.captureBreadcrumb(...);
60+ *
61+ * someOtherAppReporter.captureMessage(...);
62+ * someOtherAppReporter.captureException(...);
63+ * someOtherAppReporter.captureBreadcrumb(...);
64+ *
65+ * It should "just work".
66+ */
67+ module . exports . Client = RavenConstructor ;
You can’t perform that action at this time.
0 commit comments