GeezerVison is showing github.com — Added ReferenceIdPlugin to default set of plugins, removed client.con… · rchcomm/Exceptionless.JavaScript@a49f2e1
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: packages/core/src/configuration/Configuration.ts -7Lines changed: 0 additions & 7 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -481,13 +481,6 @@ export class Configuration { |
481 | 481 | } |
482 | 482 | } |
483 | 483 |
|
484 | | - /** |
485 | | - * Automatically set a reference id for error events. |
486 | | - */ |
487 | | - public useReferenceIds(): void { |
488 | | - this.addPlugin(new ReferenceIdPlugin()); |
489 | | - } |
490 | | - |
491 | 484 | /** |
492 | 485 | * Use localStorage for persisting things like server configuration cache and persisted queue entries (depends on usePersistedQueueStorage). |
493 | 486 | */ |
|
Collapse file
Copy file name to clipboardExpand all lines: packages/core/src/plugins/EventPluginManager.ts +5-3Lines changed: 5 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | import { Configuration } from "../configuration/Configuration.js"; |
2 | 2 | import { ConfigurationDefaultsPlugin } from "./default/ConfigurationDefaultsPlugin.js"; |
3 | 3 | import { 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"; |
7 | 4 | import { EventPluginContext } from "./EventPluginContext.js"; |
| 5 | +import { EventExclusionPlugin } from "./default/EventExclusionPlugin.js"; |
8 | 6 | import { 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"; |
9 | 10 |
|
10 | 11 | export class EventPluginManager { |
11 | 12 | public static async startup(context: PluginContext): Promise<void> { |
@@ -58,6 +59,7 @@ export class EventPluginManager { |
58 | 59 | public static addDefaultPlugins(config: Configuration): void { |
59 | 60 | config.addPlugin(new ConfigurationDefaultsPlugin()); |
60 | 61 | config.addPlugin(new SimpleErrorPlugin()); |
| 62 | + config.addPlugin(new ReferenceIdPlugin()); |
61 | 63 | config.addPlugin(new DuplicateCheckerPlugin()); |
62 | 64 | config.addPlugin(new EventExclusionPlugin()); |
63 | 65 | config.addPlugin(new SubmissionMethodPlugin()); |
|
Collapse file
Copy file name to clipboardExpand all lines: packages/core/test/ExceptionlessClient.test.ts +2-1Lines changed: 2 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 |
|
2 | 2 | import { ExceptionlessClient } from "../src/ExceptionlessClient.js"; |
3 | 3 | import { KnownEventDataKeys } from "../src/models/Event.js"; |
| 4 | +import { ReferenceIdPlugin } from "../src/plugins/default/ReferenceIdPlugin.js"; |
4 | 5 |
|
5 | 6 | describe("ExceptionlessClient", () => { |
6 | 7 | test("should use event reference ids", async () => { |
@@ -17,7 +18,7 @@ describe("ExceptionlessClient", () => { |
17 | 18 | expect(lastReferenceIdManager.getLast()).toBeNull(); |
18 | 19 |
|
19 | 20 | const numberOfPlugins = client.config.plugins.length; |
20 | | - client.config.useReferenceIds(); |
| 21 | + client.config.addPlugin(new ReferenceIdPlugin()); |
21 | 22 | expect(client.config.plugins.length).toBe(numberOfPlugins + 1); |
22 | 23 |
|
23 | 24 | context = await client.submitException(error); |
|