Socket
Socket
Sign inDemoInstall

@lightspeed/apollo-new-relic-extension

Package Overview
Dependencies
314
Maintainers
9
Versions
13
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @lightspeed/apollo-new-relic-extension

New Relic logging extension for Apollo GraphQL services


Version published
Weekly downloads
97
decreased by-11.82%
Maintainers
9
Install size
5.73 MB
Created
Weekly downloads
 

Readme

Source

@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,
});

FAQs

Last updated on 07 Jul 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc