|
| 1 | +--- |
| 2 | +name: exceptionless-javascript |
| 3 | +description: Use this skill when a developer wants to install, configure, troubleshoot, or integrate Exceptionless JavaScript clients for browser, Node.js, React, Vue, AngularJS, Express, Next.js, SvelteKit, or custom runtimes. Use it for API keys, startup, self-hosting, sending errors/logs/feature usage/404/custom events, indexed event properties, sessions, heartbeats, user identity, PII/data exclusions, plugins, runtime client configuration values, queues, and production setup even if they only ask "how do I wire up Exceptionless?" |
| 4 | +--- |
| 5 | + |
| 6 | +# Exceptionless JavaScript SDK |
| 7 | + |
| 8 | +Use this skill to produce source-accurate setup code, integration guidance, and technical documentation for the Exceptionless JavaScript clients. |
| 9 | + |
| 10 | +Keep answers compact. Prefer pointing to official docs for broad product behavior, and use local package READMEs/source to correct stale snippets or repo-specific package details. |
| 11 | + |
| 12 | +## Official Docs |
| 13 | + |
| 14 | +Primary docs: |
| 15 | + |
| 16 | +- JavaScript overview: https://exceptionless.com/docs/clients/javascript/ |
| 17 | +- Configuration: https://exceptionless.com/docs/clients/javascript/client-configuration/ |
| 18 | +- Client configuration values: https://exceptionless.com/docs/clients/javascript/client-configuration-values/ |
| 19 | +- Sending events: https://exceptionless.com/docs/clients/javascript/sending-events/ |
| 20 | +- Filtering and indexed data: https://exceptionless.com/docs/filtering-and-searching/ |
| 21 | +- User sessions: https://exceptionless.com/docs/user-sessions/ |
| 22 | +- Troubleshooting: https://exceptionless.com/docs/clients/javascript/troubleshooting/ |
| 23 | +- Self-hosting: https://exceptionless.com/docs/self-hosting/ |
| 24 | + |
| 25 | +Framework docs: |
| 26 | + |
| 27 | +- React: https://exceptionless.com/docs/clients/javascript/guides/react/ |
| 28 | +- Vue: https://exceptionless.com/docs/clients/javascript/guides/vue/ |
| 29 | +- Angular: https://exceptionless.com/docs/clients/javascript/guides/angular/ |
| 30 | +- Node: https://exceptionless.com/docs/clients/javascript/node-example/ |
| 31 | +- Express: https://exceptionless.com/docs/clients/javascript/guides/express/ |
| 32 | + |
| 33 | +## Pick References |
| 34 | + |
| 35 | +Read only the reference that matches the user's runtime, then add shared references as needed: |
| 36 | + |
| 37 | +- `@exceptionless/core`: [references/client-core.md](references/client-core.md) |
| 38 | +- `@exceptionless/browser`: [references/client-browser.md](references/client-browser.md) |
| 39 | +- `@exceptionless/node`: [references/client-node.md](references/client-node.md) |
| 40 | +- `@exceptionless/react`: [references/client-react.md](references/client-react.md) |
| 41 | +- `@exceptionless/vue`: [references/client-vue.md](references/client-vue.md) |
| 42 | +- `@exceptionless/angularjs`: [references/client-angularjs.md](references/client-angularjs.md) |
| 43 | +- Sending events: [references/sending-events.md](references/sending-events.md) |
| 44 | +- Configuration and client configuration values: [references/configuration.md](references/configuration.md) |
| 45 | +- Sessions, heartbeats, and user identity: [references/sessions.md](references/sessions.md) |
| 46 | +- Plugins: [references/plugins.md](references/plugins.md) |
| 47 | +- Data exclusions and PII: [references/data-exclusions.md](references/data-exclusions.md) |
| 48 | +- Troubleshooting: [references/troubleshooting.md](references/troubleshooting.md) |
| 49 | +- Self-hosting: [references/self-hosting.md](references/self-hosting.md) |
| 50 | + |
| 51 | +## Rules |
| 52 | + |
| 53 | +- Use `Exceptionless.startup(...)` once during app startup. `startup()` with no args is used later by lifecycle plugins to resume timers/queue processing. |
| 54 | +- Use the singleton from the platform package when automatic capture matters. Create `ExceptionlessClient` manually only for custom pipelines or tests. |
| 55 | +- `submitException` and `createException` take an `Error`. For unknown caught values, use exported `toError(value)` when available. |
| 56 | +- `markAsCritical()` marks the event critical; `markAsCritical(false)` leaves tags unchanged. |
| 57 | +- `config.serverUrl` also sets `configServerUrl` and `heartbeatServerUrl`; assign custom endpoint overrides after setting `serverUrl`. |
| 58 | +- Use lowercase log levels in new snippets: `"trace"`, `"debug"`, `"info"`, `"warn"`, `"error"`, `"fatal"`, `"off"`. |
| 59 | +- For short-lived Node/serverless work, call `await Exceptionless.processQueue()` after critical submissions. |
| 60 | + |
| 61 | +## Integrator Guidance |
| 62 | + |
| 63 | +- Prefer complete, copyable snippets with imports and realistic placeholder values. |
| 64 | +- Include only high-level setup/configuration inline; point to official docs for broader product explanation. |
| 65 | +- Make privacy controls explicit in production examples that collect request, cookie, header, query, post, or user data. Read [references/data-exclusions.md](references/data-exclusions.md) for PII-sensitive examples. |
| 66 | +- Read [references/plugins.md](references/plugins.md) before documenting custom event enrichment, runtime filtering, or cancellation behavior. |
| 67 | +- Read [references/sessions.md](references/sessions.md) before documenting sessions, heartbeats, user identity, or session end behavior. |
| 68 | +- Explain near real-time client settings with server setting keys only for advanced docs: `@@log:*`, `@@error:*`, `@@usage:*`, `@@404:*`, `@@DataExclusions`, `@@UserAgentBotPatterns`. |
| 69 | +- For SSR, hot reload, or serverless examples, memoize startup and flush short-lived server work with `await Exceptionless.processQueue()`. |
| 70 | +- Before calling snippets "compiled" or "validated", actually type-check or run a representative compile against the workspace packages. |
| 71 | + |
| 72 | +## Source Anchors |
| 73 | + |
| 74 | +Verify behavior in: |
| 75 | + |
| 76 | +- `packages/core/src/ExceptionlessClient.ts` |
| 77 | +- `packages/core/src/configuration/Configuration.ts` |
| 78 | +- `packages/core/src/EventBuilder.ts` |
| 79 | +- `packages/core/src/plugins/default/EventExclusionPlugin.ts` |
| 80 | +- `packages/core/src/submission/DefaultSubmissionClient.ts` |
| 81 | +- `packages/browser/src/BrowserExceptionlessClient.ts` |
| 82 | +- `packages/node/src/NodeExceptionlessClient.ts` |
| 83 | +- Package READMEs and `example/` apps. |
0 commit comments