You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 76dde1a
Browse filesBrowse the repository at this point in the historyBrowse files
Fix client startup, session and settings lifecycle
- startup() with no arguments now configures runtime plugins when the
API key was set beforehand; the client stays unconfigured until a call
leaves a valid key, and later calls only resume (configuration passed
to them is ignored with a warning).
- Resuming a hidden tab no longer starts a new session every time; the
session continues unless the client was suspended longer than the
server's 5-minute inactivity period. Heartbeats resume with it.
- Browser: end the session and flush on pagehide instead of
beforeunload, and resume on back/forward cache restore. React Native
web also uses pagehide.
- Add flush(timeoutMs) for short-lived processes.
- Applying server settings no longer overwrites the original settings,
so settings the server stops sending are removed; non-string values
are ignored.
- Settings updates lock per configuration instead of globally.
- config.plugins returns a sorted copy so removing a plugin while
iterating doesn't skip the next one.
Copy file name to clipboardExpand all lines: .agents/skills/exceptionless-javascript/SKILL.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,15 +30,15 @@ Read only the references needed for the request. Start with the runtime for setu
30
30
31
31
## Rules
32
32
33
-
- Use `Exceptionless.startup(...)` once during app startup. `startup()`with no args is used later by lifecycle plugins to resume timers/queue processing.
33
+
- Use `Exceptionless.startup(...)` once during app startup. The first call that leaves a valid API key configures the client, including when `config.apiKey` was set beforehand and `startup()`gets no arguments; later calls only resume timers and queue processing, and configuration passed to them is ignored with a warning.
34
34
- Use the singleton from the platform package when automatic capture matters. Create `ExceptionlessClient` manually only for custom pipelines or tests.
35
35
- For React Native or Expo apps, use `@exceptionless/react-native`; do not substitute `@exceptionless/browser` or `@exceptionless/react`.
36
36
- In Expo, add `@exceptionless/react-native/expo-plugin` when native iOS crash reporting is expected. Expo Go can report JavaScript errors but cannot load the native crash reporter.
37
37
-`submitException` and `createException` take an `Error`. For unknown caught values, use exported `toError(value)` when available.
38
38
-`markAsCritical()` marks the event critical; `markAsCritical(false)` leaves tags unchanged.
39
39
-`config.serverUrl` also sets `configServerUrl` and `heartbeatServerUrl`; assign custom endpoint overrides after setting `serverUrl`.
40
40
- Use lowercase log levels in new snippets: `"trace"`, `"debug"`, `"info"`, `"warn"`, `"error"`, `"fatal"`, `"off"`.
41
-
- For short-lived Node/serverless work, call `await Exceptionless.processQueue()` after critical submissions.
41
+
- For short-lived Node/serverless work, call `await Exceptionless.flush()` (waits up to 10 seconds by default, returns `false` on timeout) or `await Exceptionless.processQueue()` after critical submissions.
-`heartbeatInterval` defaults to 60000ms. Values below 30000ms are reset to 60000ms.
27
27
-`useSessionIdManagement` adds `SessionIdManagementPlugin`, which creates a session id and links later events to it.
28
28
29
+
Session lifetime in the browser and React Native:
30
+
31
+
-`startup()` sends a session start once. Resuming after a hidden tab continues the same session (and its heartbeats) unless the client was suspended for more than 5 minutes, after which the server has closed the session and a new one starts.
32
+
- The browser ends the session on `pagehide` and starts a new one if the page is restored from the back/forward cache. React Native ends it when the app goes to the background and starts a new one when it becomes active.
33
+
29
34
Disable heartbeat traffic while still using session events:
0 commit comments