Dashboards

Create custom dashboards to visualize your log data and metrics. Dashboards help you monitor your application's health and performance at a glance.

Dashboard Widgets

Reasonable dashboards are made up of widgets that display different types of data:

Log Count

Display the count of logs matching a query over time. This is useful for tracking error rates, user activity, or other events.

Log Table

Display a table of logs matching a query. This is useful for seeing the details of specific logs.

Gauge

Display a single value as a gauge. This is useful for showing metrics like error rates, response times, or other values that have a meaningful range.

Number

Display a single value as a number. This is useful for showing metrics like the total number of users, orders, or other counts.

Bar Chart

Display data as a bar chart. This is useful for comparing values across different categories.

Pie Chart

Display data as a pie chart. This is useful for showing the distribution of values.

Text

Display custom text. This is useful for adding context, instructions, or other information to your dashboard.

Creating Dashboards

You can create dashboards from the Reasonable dashboard or using the API.

From the Dashboard

  1. Navigate to the "Dashboards" tab in your project.
  2. Click the "Create Dashboard" button.
  3. Give your dashboard a name and description.
  4. Click "Save" to create the dashboard.
  5. Click "Add Widget" to add widgets to your dashboard.
  6. Configure each widget by selecting the widget type, query, and other settings.
  7. Arrange the widgets on the dashboard by dragging and dropping them.
  8. Click "Save" to save your dashboard.

Using the API

You can also create dashboards using the Reasonable API:

// Create a dashboard
const response = await fetch('https://api.reasonable.dev/v1/projects/{projectId}/dashboards', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer YOUR_API_KEY'
  },
  body: JSON.stringify({
    name: 'Application Overview',
    description: 'An overview of the application health and performance',
    widgets: [
      {
        type: 'log-count',
        title: 'Error Rate',
        query: 'level:error',
        timeRange: '1h',
        refreshInterval: 60, // seconds
        position: { x: 0, y: 0, width: 6, height: 4 }
      },
      {
        type: 'log-table',
        title: 'Recent Errors',
        query: 'level:error',
        limit: 10,
        position: { x: 6, y: 0, width: 6, height: 4 }
      },
      {
        type: 'gauge',
        title: 'API Response Time',
        query: 'service:api',
        field: 'response_time',
        min: 0,
        max: 1000,
        thresholds: [
          { value: 200, color: 'green' },
          { value: 500, color: 'yellow' },
          { value: 1000, color: 'red' }
        ],
        position: { x: 0, y: 4, width: 4, height: 4 }
      }
    ]
  })
});

const dashboard = await response.json();
console.log('Dashboard created:', dashboard);

Sharing Dashboards

You can share dashboards with your team or make them public:

Team Sharing

Share dashboards with specific team members or groups. Team members will need to be logged in to view the dashboard.

  1. Navigate to the dashboard you want to share.
  2. Click the "Share" button.
  3. Enter the email addresses of the team members you want to share with.
  4. Select the permission level (view, edit, or admin).
  5. Click "Share" to share the dashboard.

Public Sharing

Make dashboards public so anyone with the link can view them. Public dashboards don't require a login to view.

  1. Navigate to the dashboard you want to share.
  2. Click the "Share" button.
  3. Toggle the "Public" switch to on.
  4. Copy the public link to share with others.

Note: Public dashboards are read-only and don't include access to the underlying logs.

Dashboard Templates

Reasonable provides several dashboard templates to help you get started:

Application Overview

A general overview of your application's health and performance, including error rates, response times, and user activity.

Error Monitoring

A detailed view of errors in your application, including error rates, error types, and the most common errors.

API Performance

A dashboard focused on API performance, including response times, error rates, and request volumes.

User Activity

A dashboard focused on user activity, including user signups, logins, and other user actions.

Infrastructure

A dashboard focused on infrastructure metrics, including CPU usage, memory usage, and disk space.