convex-tracer

Track Convex function execution with detailed observability, nested spans, error tracing, and configurable sampling for debugging production issues.

Installation

npm install convex-tracer

About convex-tracer

Why use Convex Tracer?
Deep Visibility: See exactly how your Convex functions execute, including nested calls and cross-function traces
Debug Production Issues: Preserve error traces and have a complete view of of what went wrong, were it went wrong and why
Trace Sampling: Control costs with configurable sample rates while preserving important traces
Zero Boilerplate: Simple wrapper functions that feel natural in Convex
Perfect for complex workflows like multi-step order processing, payment flows, or any scenario where you need to understand what's happening across multiple function calls.

Benefits

Use cases

how to debug failed Convex mutations in production

Convex-tracer automatically captures error traces with complete context about where failures occurred across your function calls. It preserves the full execution path including nested spans, making it easy to identify the root cause of production issues.

trace Convex function calls across queries and mutations

Convex-tracer provides wrapper functions that automatically create nested spans for all your Convex operations. You can see the complete execution flow across queries, mutations, and actions with detailed timing and parameter information.

monitor multi-step order processing in Convex

Convex-tracer excels at tracking complex workflows like order processing where multiple functions execute in sequence. It creates a unified trace showing the entire workflow execution, making it easy to optimize performance bottlenecks and debug failed orders.

Frequently asked questions

Does convex-tracer impact performance in production?

Convex-tracer includes configurable sampling rates to control performance impact and costs. You can sample a percentage of traces while ensuring important traces like errors are always captured, giving you observability without significant overhead.

How does convex-tracer handle nested function calls?

Convex-tracer automatically creates nested spans when your Convex functions call other functions. This creates a hierarchical trace showing parent-child relationships and timing for each function in the call chain, providing complete visibility into complex execution flows.

Can I use convex-tracer with existing Convex functions?

Yes, convex-tracer uses simple wrapper functions that integrate seamlessly with existing Convex code. You wrap your existing query, mutation, and action handlers without changing their core logic, making adoption straightforward for existing projects.

What tracing data does convex-tracer capture?

Convex-tracer captures function execution times, parameters, return values, error details, and nested call relationships. It creates detailed spans for each function execution with automatic error tracking, giving you comprehensive observability into your Convex application behavior.

Links