Get up and running with Reasonable in just a few minutes. This guide will walk you through the basics of setting up Reasonable and sending your first logs.
First, you'll need to create a Reasonable account. If you haven't already, sign up for a free account at reasonable.dev.
The free plan includes 1 project, 100,000 logs per month, and 7 days of log retention. This is perfect for getting started and evaluating Reasonable.
After signing in, create a new project from the dashboard. Give your project a name and description that helps you identify it.
Projects help you organize your logs. You might create separate projects for different applications, environments (development, staging, production), or teams.
Once your project is created, you'll be provided with an API key. This key is used to authenticate your application with Reasonable.
Your API key will look something like this:
rsnbl_1a2b3c4d5e6f7g8h9i0jKeep your API key secure! Don't commit it to public repositories or share it publicly.
Choose the SDK for your programming language and install it in your application.
Install the SDK using npm:
npm install @reasonable/nodeOr using yarn:
yarn add @reasonable/nodeInitialize the SDK with your API key in your application.
const { Reasonable } = require('@reasonable/node');
// Initialize the client
const reasonable = new Reasonable({
apiKey: 'rsnbl_1a2b3c4d5e6f7g8h9i0j',
// Optional configuration
environment: 'production',
release: '1.0.0',
});Now you're ready to send your first log to Reasonable.
// Send a simple log
reasonable.log('Hello, Reasonable!');
// Send a log with a level
reasonable.info('User logged in', { userId: '123' });
reasonable.warn('API rate limit approaching', { endpoint: '/api/users', remaining: 10 });
reasonable.error('Failed to process payment', { orderId: '456', error: 'Invalid card' });
// Send a log with custom metadata
reasonable.log('Order created', {
orderId: '789',
amount: 99.99,
currency: 'USD',
customer: {
id: '123',
name: 'John Doe',
email: 'john@example.com'
}
});After sending logs, you can view them in the Reasonable dashboard. Navigate to your project and you'll see your logs in the "Logs" tab.
It may take a few seconds for your logs to appear in the dashboard. If you don't see them right away, wait a moment and refresh the page.
Now that you've sent your first logs to Reasonable, you can explore more advanced features: