1.1.2 • Published 4 years ago

artemetrics v1.1.2

Weekly downloads
3
License
ISC
Repository
github
Last release
4 years ago

arteMetrics

Creating performance monitors for Apollo implementations of GraphQL.

Getting Started

To get resolver metrics for your GraphQL application, follow these easy steps.

npm

Install the arteMetrics node module into your project

npm install artemetrics

Installation

  1. Head over to http://artemetrics.app and sign up to create a new app.

  2. After signing up, create a new app by clicking on the App dropdown

  3. Once you name your new app, you will be redirected to a page containing a unique API key that you can inject into your own project

  4. After copying the API key to your clipboard, paste it into a .env file

API_KEY = '45ed4db2-9ee5-4e30-a391-090a2c9cf0mg';
  1. In your server file, require in our node module:
const arteMetrics = require('artemetrics');
  1. And pass in your process.env.API_KEY into arteMetrics:
arteMetrics.setApiKey(process.env.API_KEY);
  1. Then when you create an instance of ApolloServer, pass in a couple keys to the ApolloServer constructor:
const server = new ApolloServer({
  typeDefs,
  resolvers,
  rootValue: (query) => {
    arteMetrics.getName(query);
  },
  formatResponse: (response) => {
    arteMetrics.process(response);
  }
});
  1. And then spin up your server
server.listen({ port: process.env.PORT || 4000 }).then(({ url }) => {
  console.log(`🚀 app running at ${url}`);
});
  1. And now if you head over to http://artemetrics.app and select your app, you should be able to see the queries you made through your application and track the duration of your resolvers

License

Distributed under the MIT License. MIT

Contributing

The team at arteMetrics would love contributions to this application! If there is something you would like to add, fork and clone this repo and make a PR!

People

Sean Arseneault, Brian Chiang, Saejin Kang, Noah King, Joseph Renolayan

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago