Follow these steps to install and configure RocketGraph in your application.
Install the RocketGraph package using npm or yarn:
npm install @rocketgraph/monitor
or
yarn add @rocketgraph/monitor
Sign up for a RocketGraph account and get your API key from the dashboard. You'll need this to initialize the monitoring tool.
Add the initialization code to your application's entry point:
import { RocketGraph } from '@rocketgraph/monitor';
// Initialize with your API key
RocketGraph.init({
apiKey: 'your-api-key',
// Optional configuration
environment: 'production',
appName: 'My Awesome App',
// Enable specific features
features: {
networkMonitoring: true,
errorTracking: true,
performanceMonitoring: true,
}
});
To verify that RocketGraph is working correctly, you can add a test log:
// Add a test log
RocketGraph.log('info', 'RocketGraph is working!');
Check your RocketGraph dashboard to see if the log appears. If it does, you're all set!
Now that you have RocketGraph installed, you can: