forked from aws/aws-xray-sdk-node
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
47a923a
commit ec5bbcd
Showing
115 changed files
with
11,525 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
node_modules | ||
*.log | ||
docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,75 @@ | ||
# aws-xray-sdk-node | ||
The official AWS X-Ray SDK for Node.js. | ||
# AWS X-Ray SDK for Node.js | ||
|
||
![Screenshot of the AWS X-Ray console](/images/example_servicemap.png?raw=true) | ||
|
||
## Installing | ||
|
||
The AWS X-Ray SDK for Node.js is compatible with Node.js version 0.8 and later. | ||
|
||
The SDK is available from NPM. For local development, install the SDK in your project directory with npm. | ||
|
||
``` | ||
npm install aws-xray-sdk | ||
``` | ||
|
||
Use the --save option to save the SDK as a dependency in your application's package.json. | ||
|
||
``` | ||
npm install aws-xray-sdk --save | ||
``` | ||
|
||
## Getting Help | ||
|
||
Use the following community resources for getting help with the SDK. We use the GitHub | ||
issues for tracking bugs and feature requests. | ||
|
||
* Ask a question in the [AWS X-Ray Forum](https://forums.aws.amazon.com/forum.jspa?forumID=241&start=0). | ||
* Open a support ticket with [AWS Support](http://docs.aws.amazon.com/awssupport/latest/user/getting-started.html). | ||
* If you think you may have found a bug, open an [issue](/~https://github.com/aws/aws-xray-sdk-node/issues/new). | ||
|
||
## Opening Issues | ||
|
||
If you encounter a bug with the AWS X-Ray SDK for Node.js, we want to hear about | ||
it. Before opening a new issue, search the [existing issues](/~https://github.com/aws/aws-xray-sdk-node/issues) | ||
to see if others are also experiencing the issue. Include the version of the AWS X-Ray | ||
SDK for Node.js, Node.js runtime, and other dependencies if applicable. In addition, | ||
include the repro case when appropriate. | ||
|
||
The GitHub issues are intended for bug reports and feature requests. For help and | ||
questions about using the AWS X-Ray SDK for Node.js, use the resources listed | ||
in the [Getting Help](/~https://github.com/aws/aws-xray-sdk-node#getting-help) section. Keeping the list of open issues lean helps us respond in a timely manner. | ||
|
||
## Documentation | ||
|
||
The [developer guide](https://docs.aws.amazon.com/xray/latest/devguide) provides in-depth | ||
guidance about using the AWS X-Ray service. | ||
The [API Reference](http://docs.aws.amazon.com/xray-sdk-for-nodejs/latest/reference/) | ||
provides guidance for using the SDK and module-level documentation. | ||
|
||
## Contributing | ||
|
||
This monorepo hosts the following npm packages for the SDK: | ||
- [aws-xray-sdk](https://www.npmjs.com/package/aws-xray-sdk) | ||
- [aws-xray-sdk-core](https://www.npmjs.com/package/aws-xray-sdk-core) | ||
- [aws-xray-sdk-express](https://www.npmjs.com/package/aws-xray-sdk-express) | ||
- [aws-xray-sdk-mysql](https://www.npmjs.com/package/aws-xray-sdk-mysql) | ||
- [aws-xray-sdk-postgres](https://www.npmjs.com/package/aws-xray-sdk-postgres) | ||
- [aws-xray-sdk-restify](https://www.npmjs.com/package/aws-xray-sdk-restify) | ||
|
||
This repo uses [Lerna](https://lernajs.io) to manage multiple packages. To install Lerna: | ||
``` | ||
npm install lerna | ||
``` | ||
To install devDependencies and peerDependencies for all packages: | ||
``` | ||
lerna bootstrap --hoist | ||
``` | ||
To run tests for all packages: | ||
``` | ||
lerna run test | ||
``` | ||
or go to each package and run `npm test` as usual. | ||
|
||
## License | ||
|
||
The AWS X-Ray SDK for Node.js is licensed under the Apache 2.0 License. See LICENSE and NOTICE.txt for more information. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"lerna": "2.4.0", | ||
"packages": [ | ||
"packages/*" | ||
], | ||
"version": "independent", | ||
"npmClientArgs": [ | ||
"--no-package-lock" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"name": "aws-xray-sdk-node", | ||
"private": true, | ||
"license": "Apache-2.0", | ||
"devDependencies": { | ||
"aws-xray-sdk-core": "^1.1.4", | ||
"chai": "^3.5.0", | ||
"eslint": "^3.10.2", | ||
"grunt": "^1.0.1", | ||
"grunt-contrib-clean": "^1.0.0", | ||
"grunt-jsdoc": "^2.1.0", | ||
"lerna": "^2.4.0", | ||
"mocha": "^3.0.2", | ||
"nock": "^8.0.0", | ||
"sinon": "^1.17.5", | ||
"sinon-chai": "^2.8.0" | ||
}, | ||
"engines": { | ||
"node": ">= 4.x <= 9.x", | ||
"npm": ">= 2.x <= 5.x" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"env": { | ||
"node": true, | ||
"mocha": true | ||
}, | ||
"extends": "eslint:recommended", | ||
"rules": { | ||
"indent": [ | ||
"error", | ||
2 | ||
], | ||
"linebreak-style": [ | ||
"error", | ||
"unix" | ||
], | ||
"quotes": [ | ||
"error", | ||
"single" | ||
], | ||
"semi": [ | ||
"error", | ||
"always" | ||
], | ||
"eol-last": [ | ||
"error", | ||
"always" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
.npmignore | ||
node_modules | ||
npm-debug.log | ||
docs | ||
AWSXRay.log | ||
Config | ||
fat_sdk | ||
core | ||
express | ||
mysql | ||
postgres |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Changelog for AWS X-Ray Core SDK for JavaScript | ||
<!--LATEST=1.1.4--> | ||
<!--ENTRYINSERT--> | ||
|
||
## 1.1.5 | ||
* The X-Ray SDK for Node.js is now an open source project. You can follow the project and submit issues and pull requests on [GitHub](/~https://github.com/aws/aws-xray-sdk-node). | ||
|
||
## 1.14 | ||
* bugfix: Fixing issue where an unexpected segment on the CLS context would fail in Lambda | ||
## 1.1.3 | ||
* bugfix: Resolving Lambda segment information on `getSegment` rather than on `addSubsegment`. | ||
|
||
## 1.1.2 | ||
* feature: Reintroduced global HTTP/S patcher. See the documentation for 'captureHTTPsGlobal' for details. | ||
* feature: Added AWSXray.appendAWSWhitelist function to append to the current whitelist loaded. | ||
* bugfix: Fixed compatibility issues with webpack in regard to custom sampling rules and AWS whitelists. | ||
* bugfix: Fixed issue where partial subsegment streaming would throw an error on 'undefined'. | ||
* bugfix: Fixed issue where AWS call response descriptors were attempting to be read on an error. | ||
|
||
## 1.1.1 | ||
* feature: Added debug logs for sampling rates and matches. | ||
* feature: Added patcher for the http.get helper function as a part of the captureHTTPs function. | ||
* bugfix: Fixed issue where default fixed target/rate set to zero in sampling rate file would erroneously throw an error. | ||
* bugfix: Fixed issue where url capturing for incoming requests was coded to an Express-only property. | ||
* bugfix: Fixed issue with S3 calls where only x-amz-id-2 was captured as request ID. Added 'id_2' property to properly capture S3 request ID pairs. | ||
* bugfix: Fixed issue where capturing a count of parameters on a parameter of an AWS call when the parameter wasn't defined would capture 'undefined'. | ||
* bugfix: Fixed compatibility issue with webpack. | ||
* bugfix: Fixed issue where the open socket to send segments would cause Node process to hang on attempted graceful shutdown. | ||
|
||
## 1.1.0 | ||
* **BREAKING** change: Segment.addSDKVersions() reworked into setSDKData(). | ||
* **BREAKING** change: Segment.addServiceVersions() reworked into setServiceData(). | ||
* change: Capturing AWS and HTTP calls in manual mode now uses a param 'XRaySegment' rather than 'Segment'. Backwards compatible, see usage examples in README.md. | ||
* feature: Added support for capturing AWS Lambda function invocations. | ||
* feature: Added additional data captured from NPM and process.env to segments. | ||
* feature: Added custom namespaces for metadata. Usage: segment.addMetadata(<key>, <value>, <namespace>). | ||
* bugfix: Fixed issue where AWS call capturing marked exceptions due to throttling as 'error'. Now marked as 'throttled'. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
module.exports = function(grunt) { | ||
// Project configuration. | ||
grunt.initConfig({ | ||
jsdoc: { | ||
dist: { | ||
src: ['lib/**/*.js', 'README.md'], | ||
dest: 'docs' | ||
} | ||
}, | ||
clean: { | ||
folder: ['docs'] | ||
} | ||
}); | ||
|
||
// Register jsdoc as a grunt task | ||
grunt.loadNpmTasks('grunt-jsdoc'); | ||
grunt.loadNpmTasks('grunt-contrib-clean'); | ||
|
||
grunt.registerTask('docs', ['clean', 'jsdoc']); | ||
}; |
Oops, something went wrong.