Skip to content

Commit

Permalink
Revert PR #386 (#412)
Browse files Browse the repository at this point in the history
* revert PR #386

* no backwards incompatibility
  • Loading branch information
willarmiros authored Apr 12, 2021
1 parent 2c4459a commit 9e20d2e
Show file tree
Hide file tree
Showing 19 changed files with 75 additions and 831 deletions.
295 changes: 71 additions & 224 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 0 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@
"private": true,
"license": "Apache-2.0",
"devDependencies": {
"@aws-sdk/config-resolver": "^3.3.0",
"@aws-sdk/middleware-stack": "^3.3.0",
"@aws-sdk/node-config-provider": "^3.3.0",
"@aws-sdk/smithy-client": "^3.3.0",
"@aws-sdk/types": "^3.3.0",
"@hapi/hapi": "^20.0.0",
"@types/chai": "^4.2.12",
"@types/koa": "^2.11.3",
Expand Down Expand Up @@ -46,7 +41,6 @@
"sinon": "^9.0.2",
"sinon-chai": "^3.5.0",
"tsd": "^0.13.1",
"typescript": "^4.1.3",
"upath": "^1.2.0"
},
"engines": {
Expand Down
42 changes: 0 additions & 42 deletions packages/core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -465,8 +465,6 @@ function sendRequest(host, cb) {

### Capture all outgoing AWS requests

This is only available for AWS SDK v2 due to the service-oriented architecture of AWS SDK v3.

```js
var AWS = captureAWS(require('aws-sdk'));

Expand All @@ -475,23 +473,6 @@ var AWS = captureAWS(require('aws-sdk'));

### Capture outgoing AWS requests on a single client


AWS SDK v3

```js
import { S3, PutObjectCommand } from '@aws-sdk/client-s3';

const s3 = AWSXRay.captureAWSv3Client(new S3({}));

await s3.send(new PutObjectCommand({
Bucket: bucketName,
Key: keyName,
Body: 'Hello!',
}));
```

AWS SDK v2

```js
var s3 = AWSXRay.captureAWSClient(new AWS.S3());

Expand Down Expand Up @@ -642,27 +623,6 @@ function sendRequest(host, cb, subsegment) {

### Capture outgoing AWS requests on a single client

AWS SDK v3

You must re-capture the client every time the subsegment is attached
to a new parent.

```js
import { S3, PutObjectCommand } from '@aws-sdk/client-s3';

// subsegment is an optional parameter that is required for manual mode
// and can be omitted in automatic mode (e.g. inside a Lambda function).
const s3 = AWSXRay.captureAWSv3Client(new S3({}), subsegment);

await s3.send(new PutObjectCommand({
Bucket: bucketName,
Key: keyName,
Body: 'Hello!',
}));
```

AWS SDK v2

```js
var s3 = AWSXRay.captureAWSClient(new AWS.S3());
var params = {
Expand All @@ -679,8 +639,6 @@ s3.putObject(params, function(err, data) {

### Capture all outgoing AWS requests

This is only available for AWS SDK v2 due to the service-oriented architecture of AWS SDK v3.

```js
var AWS = captureAWS(require('aws-sdk'));

Expand Down
2 changes: 1 addition & 1 deletion packages/core/lib/aws-xray.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export { captureAsyncFunc, captureCallbackFunc, captureFunc } from './capture'

export { captureAWS, captureAWSClient } from './patchers/aws_p';

export type { captureAWSClient as captureAWSv3Client } from './patchers/aws3_p';
export function captureAWSv3Client<T>(client: T, manualSeg?: SegmentLike): T;

export { captureHTTPs, captureHTTPsGlobal } from './patchers/http_p';

Expand Down
9 changes: 1 addition & 8 deletions packages/core/lib/aws-xray.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,15 +180,8 @@ var AWSXRay = {

captureAWSClient: require('./patchers/aws_p').captureAWSClient,

/**
* @param {AWSv3.Service} service - An instance of a AWS SDK v3 service to wrap.
* @param {Segment|Subsegment} segment - Optional segment for manual mode.
* @memberof AWSXRay
* @function
* @see module:aws3_p.captureAWSClient
*/

captureAWSv3Client: require('./patchers/aws3_p').captureAWSClient,
captureAWSv3Client: (client) => client,

/**
* @param {http|https} module - The built in Node.js HTTP or HTTPS module.
Expand Down
8 changes: 0 additions & 8 deletions packages/core/lib/patchers/aws3_p.d.ts

This file was deleted.

113 changes: 0 additions & 113 deletions packages/core/lib/patchers/aws3_p.js

This file was deleted.

Loading

0 comments on commit 9e20d2e

Please sign in to comment.