Skip to content

Metrist-Software/nodejs-agent

Repository files navigation

Metrist In-Process Agent for NodeJS

MetristAgent is the agent NodeJS plugin. It intercepts HTTP calls and sends data to the local Metrist Monitoring Agent. To install simply run

  npm install @metrist/metrist-agent

Usage

As early in your application's lifecycle as possible, the agent should be initalized and connected:

import { MetristAgent } from "@metrist/metrist-agent";

const agent = new MetristAgent();
// or pass a host and port:
new MetristAgent({ host: 'HOST', port: 1234 });


agent.connect();


// Disconnect once your app closes
agent.disconnect();

The MetristAgent constructor can take an object that contains host and port to configure the telemetry destination, otherwise it will attempt to use the METRIST_MONITORING_AGENT_HOST and METRIST_MONITORING_AGENT_PORT environment variables or default to '127.0.0.1' and 51712.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published