# fastify-newrelic

> Fastify plugin for newrelic

Latest version **0.0.5-beta.2** (published 2020-08-31) · MIT license · 0 weekly downloads

## Install

```sh
npm install fastify-newrelic
pnpm add fastify-newrelic
yarn add fastify-newrelic
bun add fastify-newrelic
```

## 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.0.5-beta.2 |
| Published | 2020-08-31 |
| First published | 2020-08-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 7.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Salikh Fakhrutdinov |
| Maintainers | free6k |
| Keywords | fastify, fastify-plugin, newrelic |

## Links

- npm: https://www.npmjs.com/package/fastify-newrelic
- Repository: https://github.com/free6k/fastify-newrelic
- Homepage: https://github.com/free6k/fastify-newrelic#readme
- Issues: https://github.com/free6k/fastify-newrelic/issues
- npm.io page: https://npm.io/package/fastify-newrelic

## Dependencies (2)

- [newrelic](https://npm.io/package/newrelic.md) ^6.13.0
- [fastify-plugin](https://npm.io/package/fastify-plugin.md) ^2.0.0

## Recent versions

- 0.0.5-beta.2 (latest) — 2020-08-31
- 0.0.5 (beta) — 2020-08-31
- 0.0.5-beta.1 — 2020-08-31

## README

# `fastify-newrelic` DEPRECATED

> The plugin doesn't correctly work. All works except send error notice. Problems has in fastify, because it doens't send stack trace. If are you know how resole it? Open issue or pull request :)

## Installation

```shell
$ yarn add fastify-newrelic@beta
# or
$ npm i fastify-newrelic@beta
```

## Usage

Register the plugin with your Fastify server

```ts
import * as newrelic from 'newrelic'
import Fastify from 'fastify'
import fastifyNewrelic from 'fastify-newrelic'

const server = Fastify()

server.register(fastifyCron, {
    attributes: {
        'user-id': (req) => req.headers['x-userd-id']
    },
    newrelic
})
```
And need setup newrelic with environment variables or file ([see docs](https://docs.newrelic.com/docs/agents/nodejs-agent/installation-configuration/nodejs-agent-configuration))
```
NEW_RELIC_APP_NAME=
NEW_RELIC_LICENSE_KEY=
NEW_RELIC_NO_CONFIG_FILE=true # if you do not use newrelic.js
```

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