File tree Expand file tree Collapse file tree 3 files changed +7
-11
lines changed Expand file tree Collapse file tree 3 files changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -481,13 +481,6 @@ export class Configuration {
481481 }
482482 }
483483
484- /**
485- * Automatically set a reference id for error events.
486- */
487- public useReferenceIds ( ) : void {
488- this . addPlugin ( new ReferenceIdPlugin ( ) ) ;
489- }
490-
491484 /**
492485 * Use localStorage for persisting things like server configuration cache and persisted queue entries (depends on usePersistedQueueStorage).
493486 */
Original file line number Diff line number Diff line change 11import { Configuration } from "../configuration/Configuration.js" ;
22import { ConfigurationDefaultsPlugin } from "./default/ConfigurationDefaultsPlugin.js" ;
33import { DuplicateCheckerPlugin } from "./default/DuplicateCheckerPlugin.js" ;
4- import { SimpleErrorPlugin } from "./default/SimpleErrorPlugin.js" ;
5- import { EventExclusionPlugin } from "./default/EventExclusionPlugin.js" ;
6- import { SubmissionMethodPlugin } from "./default/SubmissionMethodPlugin.js" ;
74import { EventPluginContext } from "./EventPluginContext.js" ;
5+ import { EventExclusionPlugin } from "./default/EventExclusionPlugin.js" ;
86import { PluginContext } from "./PluginContext.js" ;
7+ import { ReferenceIdPlugin } from "./default/ReferenceIdPlugin.js" ;
8+ import { SimpleErrorPlugin } from "./default/SimpleErrorPlugin.js" ;
9+ import { SubmissionMethodPlugin } from "./default/SubmissionMethodPlugin.js" ;
910
1011export class EventPluginManager {
1112 public static async startup ( context : PluginContext ) : Promise < void > {
@@ -58,6 +59,7 @@ export class EventPluginManager {
5859 public static addDefaultPlugins ( config : Configuration ) : void {
5960 config . addPlugin ( new ConfigurationDefaultsPlugin ( ) ) ;
6061 config . addPlugin ( new SimpleErrorPlugin ( ) ) ;
62+ config . addPlugin ( new ReferenceIdPlugin ( ) ) ;
6163 config . addPlugin ( new DuplicateCheckerPlugin ( ) ) ;
6264 config . addPlugin ( new EventExclusionPlugin ( ) ) ;
6365 config . addPlugin ( new SubmissionMethodPlugin ( ) ) ;
Original file line number Diff line number Diff line change 11
22import { ExceptionlessClient } from "../src/ExceptionlessClient.js" ;
33import { KnownEventDataKeys } from "../src/models/Event.js" ;
4+ import { ReferenceIdPlugin } from "../src/plugins/default/ReferenceIdPlugin.js" ;
45
56describe ( "ExceptionlessClient" , ( ) => {
67 test ( "should use event reference ids" , async ( ) => {
@@ -17,7 +18,7 @@ describe("ExceptionlessClient", () => {
1718 expect ( lastReferenceIdManager . getLast ( ) ) . toBeNull ( ) ;
1819
1920 const numberOfPlugins = client . config . plugins . length ;
20- client . config . useReferenceIds ( ) ;
21+ client . config . addPlugin ( new ReferenceIdPlugin ( ) ) ;
2122 expect ( client . config . plugins . length ) . toBe ( numberOfPlugins + 1 ) ;
2223
2324 context = await client . submitException ( error ) ;
You can’t perform that action at this time.
0 commit comments