datadog-middleware-builder
v7.6.4
Published
Datadog integration middleware builder in Typescript.
Downloads
35
Readme
Datadog middleware builder in Typescript
Provides Datadog Node.js integration with Typescript.
Installation
$ npm i datadog-middleware-builder
Usage
Express.js integration
import { DatadogMiddlewareBuilder, StatsdSingletonFactory } from 'datadog-middleware-builder';
const getStatsdClient = (): any => {
StatsdSingletonFactory.setupFactory(
Config.DATADOG_AGENT_HOST,
Config.DATADOG_AGENT_PORT,
Config.DATADOG_CACHE_DNS,
Config.DATADOG_GLOBAL_TAGS);
return StatsdSingletonFactory.getStatsdClient();
};
...
app.use(DatadogMiddlewareBuilder.build(getStatsdClient(), Config.DATADOG_SERVICE_NAME));
You can check Datadog's documentation to see what are the exposed metrics.