Skip to content

apigeecs/apigee-cli-trace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

apigee-cli-trace

Codacy Badge

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published