@adobe/spacecat-shared-utils 1.20.7 → 1.20.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/package.json +2 -1
- package/src/s3.js +2 -1
- package/src/sqs.js +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [@adobe/spacecat-shared-utils-v1.20.8](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-utils-v1.20.7...@adobe/spacecat-shared-utils-v1.20.8) (2024-10-21)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* add tracing support for v3 aws clients ([#406](https://github.com/adobe/spacecat-shared/issues/406)) ([b83ae6e](https://github.com/adobe/spacecat-shared/commit/b83ae6e6dce155358b22558c37464a9002d33fc8))
|
|
7
|
+
|
|
1
8
|
# [@adobe/spacecat-shared-utils-v1.20.7](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-utils-v1.20.6...@adobe/spacecat-shared-utils-v1.20.7) (2024-10-19)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/spacecat-shared-utils",
|
|
3
|
-
"version": "1.20.
|
|
3
|
+
"version": "1.20.8",
|
|
4
4
|
"description": "Shared modules of the Spacecat Services - utils",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
"@adobe/fetch": "4.1.9",
|
|
48
48
|
"@aws-sdk/client-s3": "3.675.0",
|
|
49
49
|
"@aws-sdk/client-sqs": "3.675.0",
|
|
50
|
+
"aws-xray-sdk": "3.10.1",
|
|
50
51
|
"@json2csv/plainjs": "7.0.6"
|
|
51
52
|
}
|
|
52
53
|
}
|
package/src/s3.js
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
+
import AWSXray from 'aws-xray-sdk';
|
|
13
14
|
import { S3Client } from '@aws-sdk/client-s3';
|
|
14
15
|
|
|
15
16
|
/**
|
|
@@ -28,7 +29,7 @@ export function s3Wrapper(fn) {
|
|
|
28
29
|
S3_BUCKET_NAME: bucket,
|
|
29
30
|
} = context.env;
|
|
30
31
|
|
|
31
|
-
context.s3.s3Client = new S3Client({ region });
|
|
32
|
+
context.s3.s3Client = AWSXray.captureAWSv3Client(new S3Client({ region }));
|
|
32
33
|
context.s3.s3Bucket = bucket;
|
|
33
34
|
}
|
|
34
35
|
|
package/src/sqs.js
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
import { SendMessageCommand, SQSClient } from '@aws-sdk/client-sqs';
|
|
14
|
+
import AWSXray from 'aws-xray-sdk';
|
|
14
15
|
|
|
15
16
|
/**
|
|
16
17
|
* @class SQS utility to send messages to SQS
|
|
@@ -19,7 +20,7 @@ import { SendMessageCommand, SQSClient } from '@aws-sdk/client-sqs';
|
|
|
19
20
|
*/
|
|
20
21
|
class SQS {
|
|
21
22
|
constructor(region, log) {
|
|
22
|
-
this.sqsClient = new SQSClient({ region });
|
|
23
|
+
this.sqsClient = AWSXray.captureAWSv3Client(new SQSClient({ region }));
|
|
23
24
|
this.log = log;
|
|
24
25
|
}
|
|
25
26
|
|