# koa-datadog

> Datadog middleware for Koa

Latest version **0.7.0** (published 2023-02-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install koa-datadog
pnpm add koa-datadog
yarn add koa-datadog
bun add koa-datadog
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.7.0 |
| Published | 2023-02-08 |
| First published | 2019-06-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 11.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Bin Hou |
| Maintainers | kouhin |
| Keywords | datadog, middleware |

## Links

- npm: https://www.npmjs.com/package/koa-datadog
- Repository: https://github.com/kouhin/koa-datadog
- Homepage: https://github.com/kouhin/koa-datadog#readme
- Issues: https://github.com/kouhin/koa-datadog/issues
- npm.io page: https://npm.io/package/koa-datadog

## Dependencies (1)

- [hot-shots](https://npm.io/package/hot-shots.md) ^10.0.0

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 0.7.0 (latest) — 2023-02-08
- 0.6.3 — 2020-08-03
- 0.6.2 — 2020-08-03
- 0.6.1 — 2020-08-03
- 0.6.0 — 2020-06-12
- 0.5.1 — 2020-03-17
- 0.4.1 — 2019-07-16
- 0.4.0 — 2019-06-11
- 0.3.0 — 2019-06-07
- 0.2.0 — 2019-06-07
- 0.1.0 — 2019-06-04

## README

# koa-datadog

Datadog middleware for [Koa](https://koajs.com)

This is a fork of [node-connect-datadog](https://github.com/DataDog/node-connect-datadog) with modifications for Koa.




## Usage

Add middleware immediately before your router.

``` javascript
import koaDatadog from 'koa-datadog';
import Koa from 'koa';

const app = new Koa();
app.use(koaDatadog({}));
```
## Options

All options are optional.

* `dogstatsd` hot-shots client. `default = new require("hot-shots")()`
* `stat` *string* name for the stat. `default = "node.express.router"`
* `tags` *array* of tags to be added to the histogram. `default = []`
* `route`*boolean* include route tag (koa-route and koa-router are supported). `default = false`.
* `path` *boolean* include path tag. `default = false`
* `method` *boolean* include http method tag. `default = false`
* `protocol` *boolean* include protocol tag. `default = false`
* `response_code` *boolean* include http response codes. `default = false`
* `delim` *string* char to replace pipe char with in the route `default = '-'`

## License

View the [LICENSE](https://github.com/kouhin/koa-datadog/blob/master/LICENSE) file.

---
_Source: https://npm.io/package/koa-datadog · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
