> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flowripple.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Monitoring Event Captures

> Track event triggers, view capture data, and analyze event statistics in Flowripple.

# Monitoring Event Captures

Every time you trigger an event, Flowripple records it as a **capture**. Captures create an audit trail of all triggered events, making it easy to monitor activity, debug issues, and analyze patterns.

## What are Captures?

A capture is a record of a single event trigger. Each capture contains:

| Property      | Description                                   |
| ------------- | --------------------------------------------- |
| `id`          | Unique capture identifier                     |
| `createdAt`   | Timestamp when the event was triggered        |
| `payload`     | The JSON data sent with the trigger           |
| `processed`   | Whether workflows have processed this capture |
| `processedAt` | Timestamp when processing completed           |

```
Event Triggered → Capture Created → Workflows Execute → Capture Marked Processed
```

## Viewing Captures

### Event Captures List

1. Navigate to the **Events** section in your dashboard
2. Click on an event to view its details
3. Select the **Captures** tab to see all triggers for that event

Each capture entry shows:

* Capture ID and timestamp
* Processing status (pending, processed, failed)
* Quick preview of payload data

### Capture Details

Click on any capture to view full details:

* **Complete payload**: The entire JSON object sent with the trigger
* **Processing timeline**: When the capture was received and processed
* **Workflow executions**: Links to workflow runs triggered by this capture
* **Variable values**: Extracted values available to workflows

<Tip>
  Use capture details to debug workflow issues. You can see exactly what data was available when workflows executed.
</Tip>

## Event Statistics

The event detail page displays statistics for triggered events:

### Metrics Available

| Metric             | Description                                 |
| ------------------ | ------------------------------------------- |
| **Total Captures** | All-time count of triggers for this event   |
| **Processed**      | Captures that completed workflow processing |
| **Pending**        | Captures waiting for workflow execution     |
| **Failed**         | Captures where workflow processing failed   |

### Time Series Charts

View trigger activity over time with interactive charts:

* **Daily triggers**: Number of events per day
* **Processing times**: How long workflows take to complete
* **Error rates**: Percentage of failed processing

### Date Range Selection

Filter statistics by time period:

| Range         | Description           |
| ------------- | --------------------- |
| Last 24 hours | Recent activity       |
| Last 7 days   | Weekly trends         |
| Last 30 days  | Monthly overview      |
| Custom range  | Select specific dates |

## Viewing Capture Payloads

### Quick Preview

The captures list shows a truncated preview of each payload. Hover over the preview to see more detail.

### Full Payload View

Click on a capture to open the full payload view:

```json theme={null}
{
  "orderId": "ord_789",
  "customer": {
    "id": "cust_123",
    "email": "customer@example.com",
    "name": "Jane Smith"
  },
  "items": [
    { "sku": "PROD-001", "quantity": 2, "price": 29.99 },
    { "sku": "PROD-002", "quantity": 1, "price": 49.99 }
  ],
  "total": 109.97,
  "createdAt": "2024-01-15T14:30:00Z"
}
```

<Note>
  Payloads are displayed with syntax highlighting and can be copied to clipboard for debugging.
</Note>

## Debugging Workflow Failures

When workflows fail, use captures to identify the cause:

### Common Issues

<AccordionGroup>
  <Accordion title="Missing payload fields">
    Check if the capture payload contains all expected fields. Missing data can cause workflow steps to fail.

    **Solution**: Ensure your trigger code sends consistent payloads with all required fields.
  </Accordion>

  <Accordion title="Invalid data types">
    Verify that payload values match expected types. A string where a number is expected can cause issues.

    **Solution**: Review the captured payload and compare against your event's expected schema.
  </Accordion>

  <Accordion title="Empty or null values">
    Some workflow steps may fail on null or empty values.

    **Solution**: Provide default values when triggering events:

    ```typescript theme={null}
    await flowripple.trigger('user.signup', {
      name: user.name || 'Unknown User',
      email: user.email // Required field
    });
    ```
  </Accordion>

  <Accordion title="Payload too large">
    Very large payloads may cause processing issues.

    **Solution**: Send only necessary data. Avoid including large blobs or arrays.
  </Accordion>
</AccordionGroup>

### Debugging Steps

1. **Find the failed capture**: Filter captures by status to find failures
2. **Review the payload**: Check if data is complete and correctly formatted
3. **Check workflow execution**: Click through to see which step failed
4. **Compare with successful captures**: Look at working captures to spot differences
5. **Test with sample data**: Manually trigger the event with corrected data

## Best Practices

<AccordionGroup>
  <Accordion title="Monitor capture rates">
    Unusual spikes or drops in capture rates can indicate issues:

    * Sudden increase: Possible duplicate triggers or loops
    * Sudden decrease: Integration issues or code changes
    * Gradual decline: User engagement changes
  </Accordion>

  <Accordion title="Set up alerts">
    Configure alerts for:

    * High failure rates
    * No captures in expected time window
    * Processing delays
  </Accordion>

  <Accordion title="Use captures for testing">
    When debugging, trigger test events with known payloads and verify they appear as expected captures.
  </Accordion>

  <Accordion title="Review failed captures regularly">
    Schedule regular reviews of failed captures to catch issues before they affect users.
  </Accordion>
</AccordionGroup>

## What's Next?

<CardGroup cols={2}>
  <Card title="Events Overview" icon="bolt" href="/events">
    Return to the events overview for more context.
  </Card>

  <Card title="Event Trigger" icon="bolt" href="/workflows/triggers/event-trigger">
    Learn how to configure workflows to respond to events.
  </Card>
</CardGroup>
