From b1918902c018c0f75d097c7454a495ec5e46ba96 Mon Sep 17 00:00:00 2001 From: Jamie Ivanov Date: Wed, 4 Apr 2018 13:41:35 -0500 Subject: [PATCH 1/2] Updated default timeout Changed default timeout value to 5 seconds so that it matches the Python and Go libraries. --- lib/client/conf.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/client/conf.js b/lib/client/conf.js index 6ddf76a..e14c789 100644 --- a/lib/client/conf.js +++ b/lib/client/conf.js @@ -6,7 +6,7 @@ exports.DEFAULT_INGEST_ENDPOINT = 'https://ingest.signalfx.com'; exports.DEFAULT_API_ENDPOINT = 'https://api.signalfx.com'; exports.DEFAULT_SIGNALFLOW_WEBSOCKET_ENDPOINT = 'wss://stream.signalfx.com'; exports.DEFAULT_BATCH_SIZE = 300;// Will wait for this many requests before posting -exports.DEFAULT_TIMEOUT = 1000; // Default timeout is 1s +exports.DEFAULT_TIMEOUT = 5000; // Default timeout is 5s // Whether to request SignalFlow WebSocket message compression. exports.COMPRESS_SIGNALFLOW_WEBSOCKET_MESSAGES = true; From 8d25e466fb6f76fd9b48d30e9ff044e71dcbac3f Mon Sep 17 00:00:00 2001 From: Jamie Ivanov Date: Wed, 4 Apr 2018 13:43:03 -0500 Subject: [PATCH 2/2] Updated timeout in README Updated the default timeout value in the README. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3fe4718..7435045 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ Object `options` is an optional map and may contains following fields: + **enableAmazonUniqueId** - boolean, `false` by default. If `true`, library will retrieve Amazon unique identifier and set it as `AWSUniqueId` dimension for each datapoint and event. Use this option only if your application deployed to Amazon + **dimensions** - object, pre-defined dimensions for each datapoint and event. This object has key-value format `{ dimension_name: dimension_value, ...}` + **ingestEndpoint** - string, custom url to send datapoints in format http://custom.domain/api/path -+ **timeout** - number, sending datapoints timeout in ms (default is 1000ms) ++ **timeout** - number, sending datapoints timeout in ms (default is 5000ms) + **batchSize** - number, batch size to group sending datapoints + **userAgents** - array of strings, items from this array will be added to 'user-agent' header separated by comma + **proxy** - string, defines an address and credentials for sending metrics through a proxy server. The string should have the following format `http://:@:`