diff --git a/packages/salesforce/_dev/build/docs/README.md b/packages/salesforce/_dev/build/docs/README.md index 64f9d1f99fa..4caa956ba46 100644 --- a/packages/salesforce/_dev/build/docs/README.md +++ b/packages/salesforce/_dev/build/docs/README.md @@ -151,6 +151,14 @@ After the integration is successfully configured, clicking on the Assets tab of ## Troubleshooting +### Request timeout + +In `Apex`, `Login Rest`, `Logout Rest`, or `SetupAuditTrail` datastreams, if the response is getting delayed from the Salesforce server side due to any reason then the following error might occur: +``` +Error while processing http request: failed to execute rf.collectResponse: failed to execute http client.Do: failed to execute http client.Do: failed to read http.response.body +``` +In this case, consider increasing `Request timeout` configuration from `Advanced options` section of that data stream. + ### Data ingestion error In case of data ingestion if the user finds the following type of error logs: diff --git a/packages/salesforce/changelog.yml b/packages/salesforce/changelog.yml index 0e1a4955ba7..eda10f3b5ed 100644 --- a/packages/salesforce/changelog.yml +++ b/packages/salesforce/changelog.yml @@ -1,4 +1,9 @@ # newer versions go on top +- version: "0.10.1" + changes: + - description: Add 'Request timeout' configuration. + type: enhancement + link: https://github.com/elastic/integrations/pull/7891 - version: "0.10.0" changes: - description: Rename ownership from obs-service-integrations to obs-infraobs-integrations diff --git a/packages/salesforce/data_stream/apex/agent/stream/httpjson.yml.hbs b/packages/salesforce/data_stream/apex/agent/stream/httpjson.yml.hbs index 87b94b8a800..655d199cda7 100644 --- a/packages/salesforce/data_stream/apex/agent/stream/httpjson.yml.hbs +++ b/packages/salesforce/data_stream/apex/agent/stream/httpjson.yml.hbs @@ -11,6 +11,9 @@ auth.oauth2: token_url: {{token_url}} user: {{username}} password: {{password}} +{{#if request_timeout}} +request.timeout: {{request_timeout}} +{{/if}} request.url: {{instance_url}}/services/data/v54.0/query?q=apex request.transforms: - set: diff --git a/packages/salesforce/data_stream/apex/manifest.yml b/packages/salesforce/data_stream/apex/manifest.yml index d9ca8a8e379..499224e507c 100644 --- a/packages/salesforce/data_stream/apex/manifest.yml +++ b/packages/salesforce/data_stream/apex/manifest.yml @@ -28,6 +28,14 @@ streams: type: bool multi: false default: false + - name: request_timeout + type: text + title: Request timeout + description: Duration before declaring that the HTTP client connection has timed out. Valid time units are `s` (seconds) and `m` (minutes). Default is 30s if left empty. + show_user: false + multi: false + required: false + default: 5m - name: processors type: yaml title: Processors diff --git a/packages/salesforce/data_stream/login_rest/agent/stream/httpjson.yml.hbs b/packages/salesforce/data_stream/login_rest/agent/stream/httpjson.yml.hbs index d1d1a8547c5..1b5d7f215b5 100644 --- a/packages/salesforce/data_stream/login_rest/agent/stream/httpjson.yml.hbs +++ b/packages/salesforce/data_stream/login_rest/agent/stream/httpjson.yml.hbs @@ -11,6 +11,9 @@ auth.oauth2: token_url: {{token_url}} user: {{username}} password: {{password}} +{{#if request_timeout}} +request.timeout: {{request_timeout}} +{{/if}} request.url: {{instance_url}}/services/data/v54.0/query?q=login+rest request.transforms: - set: diff --git a/packages/salesforce/data_stream/login_rest/manifest.yml b/packages/salesforce/data_stream/login_rest/manifest.yml index d80a3b7c85f..f15fb899c00 100644 --- a/packages/salesforce/data_stream/login_rest/manifest.yml +++ b/packages/salesforce/data_stream/login_rest/manifest.yml @@ -28,6 +28,14 @@ streams: type: bool multi: false default: false + - name: request_timeout + type: text + title: Request timeout + description: Duration before declaring that the HTTP client connection has timed out. Valid time units are `s` (seconds) and `m` (minutes). Default is 30s if left empty. + show_user: false + multi: false + required: false + default: 5m - name: processors type: yaml title: Processors diff --git a/packages/salesforce/data_stream/logout_rest/agent/stream/httpjson.yml.hbs b/packages/salesforce/data_stream/logout_rest/agent/stream/httpjson.yml.hbs index 6b172fc59e8..281f068bdf1 100644 --- a/packages/salesforce/data_stream/logout_rest/agent/stream/httpjson.yml.hbs +++ b/packages/salesforce/data_stream/logout_rest/agent/stream/httpjson.yml.hbs @@ -11,6 +11,9 @@ auth.oauth2: token_url: {{token_url}} user: {{username}} password: {{password}} +{{#if request_timeout}} +request.timeout: {{request_timeout}} +{{/if}} request.url: {{instance_url}}/services/data/v54.0/query?q=logout+rest request.transforms: - set: diff --git a/packages/salesforce/data_stream/logout_rest/manifest.yml b/packages/salesforce/data_stream/logout_rest/manifest.yml index bbaa28038d8..00f27352802 100644 --- a/packages/salesforce/data_stream/logout_rest/manifest.yml +++ b/packages/salesforce/data_stream/logout_rest/manifest.yml @@ -28,6 +28,14 @@ streams: type: bool multi: false default: false + - name: request_timeout + type: text + title: Request timeout + description: Duration before declaring that the HTTP client connection has timed out. Valid time units are `s` (seconds) and `m` (minutes). Default is 30s if left empty. + show_user: false + multi: false + required: false + default: 5m - name: processors type: yaml title: Processors diff --git a/packages/salesforce/data_stream/setupaudittrail/agent/stream/httpjson.yml.hbs b/packages/salesforce/data_stream/setupaudittrail/agent/stream/httpjson.yml.hbs index 0b1c74333f4..cd53a5ae532 100644 --- a/packages/salesforce/data_stream/setupaudittrail/agent/stream/httpjson.yml.hbs +++ b/packages/salesforce/data_stream/setupaudittrail/agent/stream/httpjson.yml.hbs @@ -11,6 +11,9 @@ auth.oauth2: token_url: {{token_url}} user: {{username}} password: {{password}} +{{#if request_timeout}} +request.timeout: {{request_timeout}} +{{/if}} request.url: {{instance_url}}/services/data/v54.0/query?q=setupaudittrail+rest request.transforms: - set: diff --git a/packages/salesforce/data_stream/setupaudittrail/manifest.yml b/packages/salesforce/data_stream/setupaudittrail/manifest.yml index 949cc70ca7c..9ac116c79ad 100644 --- a/packages/salesforce/data_stream/setupaudittrail/manifest.yml +++ b/packages/salesforce/data_stream/setupaudittrail/manifest.yml @@ -28,6 +28,14 @@ streams: type: bool multi: false default: false + - name: request_timeout + type: text + title: Request timeout + description: Duration before declaring that the HTTP client connection has timed out. Valid time units are `s` (seconds) and `m` (minutes). Default is 30s if left empty. + show_user: false + multi: false + required: false + default: 5m - name: processors type: yaml title: Processors diff --git a/packages/salesforce/docs/README.md b/packages/salesforce/docs/README.md index e30ac2dffb1..e6180062042 100644 --- a/packages/salesforce/docs/README.md +++ b/packages/salesforce/docs/README.md @@ -151,6 +151,14 @@ After the integration is successfully configured, clicking on the Assets tab of ## Troubleshooting +### Request timeout + +In `Apex`, `Login Rest`, `Logout Rest`, or `SetupAuditTrail` datastreams, if the response is getting delayed from the Salesforce server side due to any reason then the following error might occur: +``` +Error while processing http request: failed to execute rf.collectResponse: failed to execute http client.Do: failed to execute http client.Do: failed to read http.response.body +``` +In this case, consider increasing `Request timeout` configuration from `Advanced options` section of that data stream. + ### Data ingestion error In case of data ingestion if the user finds the following type of error logs: diff --git a/packages/salesforce/manifest.yml b/packages/salesforce/manifest.yml index 9e37347ff8b..02e55c441e3 100644 --- a/packages/salesforce/manifest.yml +++ b/packages/salesforce/manifest.yml @@ -1,7 +1,7 @@ format_version: 1.0.0 name: salesforce title: Salesforce -version: "0.10.0" +version: "0.10.1" license: basic description: Collect logs from Salesforce with Elastic Agent. type: integration