Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/apigeecs/apigee-cli-trace
https://github.com/apigeecs/apigee-cli-trace
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/apigeecs/apigee-cli-trace
- Owner: apigeecs
- License: other
- Created: 2016-05-11T21:55:08.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-06-25T11:04:28.000Z (over 7 years ago)
- Last Synced: 2024-09-29T09:14:23.023Z (5 months ago)
- Language: JavaScript
- Size: 6.84 KB
- Stars: 4
- Watchers: 9
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
apigee-cli-trace
===================
[](https://www.codacy.com/app/dallen/apigee-cli-trace?utm_source=github.com&utm_medium=referral&utm_content=apigeecs/apigee-cli-trace&utm_campaign=Badge_Grade)A utility providing a means of easily capturing trace messages for offline analysis from the command line.
## Installation
The only prerequisites not handled during the installation are a functional Node environment, the availability of npm, and sufficient priviledges to run commands as adminstrator. The steps below are applicable to a Mac OS X environment, similar steps work under Linux or Windows.
Clone this project to your local machine:`$ git clone https://github.com/apigeecs/apigee-cli-trace.git`
Alternatively you can download the zip file via the GitHub home page and unzip the archive.
Navigate to the package directory:
`$ cd path/to/apigee-cli-trace/package/`
Install globally:
`$ sudo npm install . -g`
## Usage
```
var trace = require("./package/apigee-cli-trace");trace.capture({
debug: true,
org: "davidwallen2014",
env: "prod",
api: "24Solver",
rev: "19",
auth: "Basic encodeduserandsecret",
saveTo: "./capturedTraceFiles"
});
```Execute the following:
`$ node ./capture.js`
Where `capture.js` is a script as outlined above. Note the script runs until cancelled.
Output includes a information summarizing captured trace messages:
Note that the utility captures a subset of traffic - it is not capable of nor intended to capture all traffic in a given run. Consider it as sampling as much as 90% or as low as 60% of traffic depending on the speed of your local machine, local network, and rate of traffic in the target proxy.
## Tests
none yet
## Security Thoughts
Storing your hased credentials in the configuration file is not optimal. Alternatively, you can create environment variables that will be used if you omit the auth in the configuration. Define Apigee_User and Apigee_Secret to utilize this feature.
## Contributing
In lieu of a formal style guide, take care to maintain the existing coding style.
Add unit tests for any new or changed functionality. Lint and test your code.## Release History
* 0.1.0 Initial release