Skip to main content

Methods View

The Methods view provides detailed insights into your Meteor Method performance.

Overview

The Methods tab shows:

  • Response time trends over time
  • List of all tracked methods
  • Performance metrics per method
  • Slow method identification

Response Time Chart

The main chart displays response time over the selected time range:

  • Line: Average response time
  • Shaded area: p50-p95 range
  • Dots: Error occurrences

Chart Interactions

  • Hover: See exact values at any point
  • Drag: Select a time range to zoom
  • Double-click: Reset zoom

Methods Table

The table lists all tracked methods with columns:

ColumnDescription
NameMethod name
CallsTotal invocations
Avg TimeAverage response time
p9595th percentile response time
ErrorsError count
Error %Error rate

Sorting and Filtering

  • Click column headers to sort
  • Use the search box to filter by method name
  • Toggle "Show only slow methods" to filter

Method Detail

Click any method to see:

Performance Tab

  • Response time distribution histogram
  • Percentile breakdown (p50, p75, p95, p99)
  • Response time trend chart

Traces Tab

Recent method invocations showing:

  • Exact timestamp
  • Response time
  • User ID
  • Arguments (if captured)
  • Error details (if failed)

Errors Tab

Errors specific to this method:

  • Error messages and counts
  • Stack traces
  • Affected users

Identifying Slow Methods

Automatic Detection

Methods are flagged when:

  • Average response time > 500ms (warning)
  • Average response time > 2000ms (critical)
  • Response time increased significantly

Investigation Steps

  1. Check the trend - Is it newly slow or always slow?
  2. Look at percentiles - Is p99 much higher than average?
  3. Review arguments - Are certain inputs causing slowness?
  4. Check errors - Are errors causing retries?

Optimization Tips

Common Causes of Slow Methods

  1. Missing database indexes

    // Ensure your queries are indexed
    Posts.createIndex({ authorId: 1, createdAt: -1 });
  2. N+1 queries

    // Bad: Query in loop
    posts.forEach(post => {
    const author = Users.findOne(post.authorId);
    });

    // Good: Batch query
    const authorIds = posts.map(p => p.authorId);
    const authors = Users.find({ _id: { $in: authorIds } });
  3. Heavy computation

    Consider offloading to background jobs for heavy processing.

  4. External API calls

    Use caching and implement timeouts for external services.

Next Steps