Skip to content

Add 'disable' setting to node docs #4522

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Apr 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@ Setting | Details
`maxEventsInBatch` _number_ | The number of messages to enqueue before flushing. The default is: `15`
`flushInterval` _number_ | The number of milliseconds to wait before flushing the queue automatically. The default is: `10000`
`httpRequestTimeout` | The maximum number of milliseconds to wait for an http request. The default is: `10000`
`disable` | Disable the analytics library for testing. The default is: `false`

## Graceful shutdown
Avoid losing events after shutting down your console. Call `.closeAndFlush()` to stop collecting new events and flush all existing events. If a callback on an event call is included, this also waits for all callbacks to be called, and any of their subsequent promises to be resolved.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,10 @@ If you're using the [classic version of Analytics Node.js](/docs/connections/sou
```
* The `flushAt` configuration option changed to `maxEventsInBatch`.

* The `enable` setting (for disabling analytics during tests) changed to `disable`. `enable: false` changed to `disable: true`.

#### Removals
The updated Analytics Node.js removed these configuration options:
- `enable`
- `errorHandler` (see the docs on [error handling](/docs/connections/sources/catalog/libraries/server/node//#error-handling) for more information)

The updated Analytics Node.js library removed undocumented behavior around `track` properties
Expand All @@ -87,4 +88,4 @@ analytics.track({
myProp: 'abc'
}
})
```
```