@onlyknoppas/apollo-sentry-plugin
TypeScript icon, indicating that this package has built-in type declarations

1.2.2 • Public • Published

Sentry Plugin

A Sentry Plugin for Apollo Server which implements performance and error tracking.

import { getApolloSentryPlugin } from 'apollo-sentry-plugin'

// Checks that you have an env var SENTRY_DSN and fails if you don't, or if it's of an invalid syntax.
const apolloSentryPlugin = getApolloSentryPlugin(`My Apollo Server`)

const server = new ApolloServer({
	typeDefs,
	resolvers,
	dataSources,
	csrfPrevention: true,
	// Here we go.
	plugins: [apolloSentryPlugin]
})

Why?

Because while there are a few articles on how to do this, somehow I still found it painful to do it the first time around, and I'm a fan of fixing every problem once.

Credits

Took bits and pieces from the following docs and articles:

Package Sidebar

Install

npm i @onlyknoppas/apollo-sentry-plugin

Weekly Downloads

3

Version

1.2.2

License

MIT

Unpacked Size

19.1 kB

Total Files

19

Last publish

Collaborators

  • onlyknoppas