# metrics-sender

> Library for sending application metrics

Latest version **0.0.10** (published 2021-06-08) · ISC license · 0 weekly downloads

## Install

```sh
npm install metrics-sender
pnpm add metrics-sender
yarn add metrics-sender
bun add metrics-sender
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.10 |
| Published | 2021-06-08 |
| First published | 2017-11-02 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 52.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Tomas Sedlacek |
| Maintainers | hanaboso |
| Keywords | nodejs, metrics, udp |

## Links

- npm: https://www.npmjs.com/package/metrics-sender
- Repository: https://github.com/hanaboso/metrics-sender
- Homepage: https://github.com/hanaboso/metrics-sender#readme
- Issues: https://github.com/hanaboso/metrics-sender/issues
- npm.io page: https://npm.io/package/metrics-sender

## Dependencies (1)

- [hb-utils](https://npm.io/package/hb-utils.md) 0.0.4

## Recent versions

- 0.0.10 (latest) — 2021-06-08
- 0.0.8 — 2018-01-29
- 0.0.7 — 2018-01-29
- 0.0.6 — 2018-01-03
- 0.0.5 — 2017-12-13
- 0.0.4 — 2017-11-02
- 0.0.3 — 2017-11-02
- 0.0.1 — 2017-11-02

## README

#metrics-sender

## How to install:
`$ npm install metrics-sender`

## How to use (Typescript)

Import dependencies (Typescript):
```typescript
import {Metrics} from "metrics-sender";

// Define initial values
const tags = {name: "app", host: "1.1.1.1", foo: "bar"};
const fields = {value1: 10000, value2: "some value"};

// Set connection details
const m = new Metrics("measurementName", tags, "localhost", 3333);

// Add more tag
m.addTag("added", "foo");

// Or remove some unnecessary tag
m.removeTag("host");

// And finally send UDP packet
m.send(fields);
```

## How to contribute:

Create pull request to `https://github.com/hanaboso/metrics-sender` repository.
Please note that this lib is written in typescript.

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