0.1.12 • Published 3 years ago

@lightspeed/apollo-new-relic-extension v0.1.12

Weekly downloads
649
License
MIT
Repository
-
Last release
3 years ago

@lightspeed/apollo-new-relic-extension

npm version

Introduction

New Relic logging extension for GraphQL services. This extension will log all GraphQL transactions as New Relic transactions, providing insight into the operation query, an easily digestable time tracing summary, and a total error count.

Quick Start

  1. Install the dependency in your webapp.
yarn add newrelic @lightspeed/apollo-new-relic-extension
  1. Configure New Relic by either creating a newrelic.js configuration file at the root directory of your service, or setting environment variables as described here. You will at least need to set the app_name and license_key configurations.

  2. Add require('newrelic'); as the first line of your application's entry point. Modules syncronously loaded after New Relic will be instrumented appropriately.

  3. Enable the extension and tracing in your Apollo server configuration.

import ApolloNewRelicExtension from '@lightspeed/apollo-new-relic-extension';

// server.ts
const server = new ApolloServer({
  // ...
  extensions: [() => new ApolloNewRelicExtension()],
  tracing: true,
});
0.1.12

3 years ago

0.1.11

4 years ago

0.1.10

4 years ago

0.1.9

4 years ago

0.1.8

4 years ago

0.1.7

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago