npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ca-agent

v1.0.0

Published

EPAgent plugin for node APM

Downloads

5

Readme

ca-agent

APM agent for reporting Node.js application metrics to EP Agent.

How to Access the Product Documentation

The CA Application Performance Management product documentation is now available on a wiki platform. We expect this will not only allow easier access to specific information, but also improve our ability to respond with improvements and enhancements.

You can access the documentation from https://support.ca.com/ as usual. In place of a bookshelf displaying, the documentation wiki displays.

In the wiki, you can access the Node.js Agent documentation by selecting Implementing Agents, then Node.js Agent Implementation guide.

License

NOTICE: This product is owned and/or licensed by CA Technologies (“CA”).

An active license agreement for CA Application Performance Management (“License Agreement”) is required for its use. Your use of this product is governed by the terms of the License Agreement. If you do not have an active License Agreement with CA, you may not use this product.

For details, please contact CA.

Usage

The EP Agent can be used via a runner script, or via API integration.

The runner script allows use of the agent with zero code modifications, but using a runner script instead of node may not be feasible in all environments.

Using EP Agent with a global runner (no code change required)

The simplest way to collect metrics from a node application and report it to your EP Agent is to install ca-agent globally and use ca-agent-run to run your application.

$ npm install --global ca-agent

Then, run your app with it as you would with node:

$ cd my-app
my-app$ ca-agent-run .

By default, ca-agent-run will configure ca-agent to report to localhost:8080. The host and port can be changed by setting the EPAGENT environment variable.

$ EPAGENT=http://stats-server.mydomain:8000 ca-agent-run my-app

Using EP Agent with a local runner (no code change required)

It is also possible to install ca-agent as an application dependency, avoiding any modification of the system and keeping all dependencies local to the application:

$ cd to/your/app/root
my-app$ npm install --save ca-agent

Note the lack of --global option to npm install in the above.

Then, run your app with it as you would with node:

my-app$ ./node_modules/.bin/ca-agent-run .

Using EP Agent via API integration (no runner required)

First, install the agent and add it as a dependency of your application.

$ npm install --save ca-agent

Then, require the agent as early as possible in your application, specifying the host and port that you have configured your EP Agent to accept metrics on.

require('ca-agent')({
    host: '54.191.244.236',  // your EP Agent host
    port: 8080,              // your EP Agent REST API port
    appName: 'my-app',       // name to report metrics under
});
// your code here...

Metrics

Metrics will appear hierarchically in EPAgent under the prefix Strongloop|$hostname|$appName|<metric> and with the following names and types:

  • StrongLoop | $hostname | $appName
    • gc
      • heap
        • used (IntCounter)
    • heap
      • used (IntCounter)
      • total (IntCounter)
    • cpu
      • user (IntCounter)
      • system (IntCounter)
      • total (IntCounter)
    • http
      • connection
        • count (IntCounter)
      • average (IntAverage)
      • maximum (IntAverage)
      • minimum (IntAverage)
    • backends | $backendHost
      • average (IntAverage)
      • maximum (IntAverage)
      • minimum (IntAverage)
    • loop
      • "count (ticks)" (PerIntervalCounter)
      • "minimum (ms)" (IntCounter)
      • "maximum (ms)" (IntCounter)
      • "average (ms)" (IntAverage)