🔍 Code Monitoring
Debug production code without stopping your application. Set non-breaking breakpoints and capture variable state in real-time.
Production Debugging Without Downtime!
Set breakpoints in production and capture variables, stack traces, and context without redeploying. Less than 5ms overhead.
🎯 What is Code Monitoring?
Non-Breaking Breakpoints
Create breakpoints that capture data without stopping your application.
Capture Variable State
See all variable values at the exact moment the breakpoint was hit.
Full Stack Traces
Complete call stack showing how code reached that breakpoint.
Request Context
HTTP headers, trace IDs, and more to understand what triggered execution.
⚙️ How It Works
Automatic Code Discovery
TraceKit automatically indexes your code from traces you're already sending. When traces contain stack traces (from errors or instrumentation), we extract file paths, functions, and line numbers. No extra instrumentation needed!
Send Traces
Your existing traces automatically index code. Stack traces reveal file paths and functions.
Browse & Set Breakpoints
Click "Browse Code" to see discovered files/functions, then click "Set Breakpoint" on any location.
Capture & Debug
When that code runs, we capture variables, stack trace, and context automatically. View snapshots in the UI.
💡 Recommended: Use CheckAndCaptureWithContext() for automatic breakpoint registration. The SDK handles file detection, line tracking, and breakpoint creation for you!
🚀 Quick Start
Step 1: Install SDK
go get github.com/Tracekit-Dev/go-sdk/tracekitStep 2: Initialize SDK
import "github.com/Tracekit-Dev/go-sdk/tracekit"
sdk, err := tracekit.NewSDK(tracekit.Config{
ServiceName: "my-service",
APIKey: "your-api-key",
Endpoint: "localhost:8081",
UseSSL: false,
EnableCodeMonitoring: true, // Enable automatic breakpoint registration
})
if err != nil {
log.Fatal(err)
}
defer sdk.Shutdown()Step 3: Add Checkpoints (Automatic)
Recommended: Automatic Breakpoint Registration
Breakpoints are automatically created and updated when you call CheckAndCaptureWithContext. No manual UI setup required!
// Automatic file/line detection + auto-creates breakpoint!
sdk.CheckAndCaptureWithContext(ctx, "payment-processing", map[string]interface{}{
"userID": userID,
"amount": amount,
})
// The SDK will:
// 1. Detect file path and line number automatically
// 2. Auto-create/update the breakpoint in TraceKit
// 3. Capture snapshot when breakpoint is activeStep 4: View & Manage (Optional)
Breakpoints are automatically created and enabled. You can optionally:
- View captured snapshots in the UI at
/snapshots - Adjust conditions or sampling rates
- Browse auto-discovered code
- Disable/enable breakpoints as needed
Advanced: Manual Breakpoint Creation
For advanced users who want full control, you can manually create breakpoints in the UI first:
Go to Code Monitoring and create a breakpoint for payment.go:42
Available SDKs
Code Monitoring is available in all TraceKit SDKs. Choose your language to get started:
Official SDK for Node.js and TypeScript applications
- Express & Fastify middleware
- Full TypeScript support
- Automatic batching & retry
Official SDK for Python 3.8+ applications
- Flask, Django & FastAPI middleware
- Type hints support
- Context managers for tracing
Official SDK for Go applications
- Goroutine-safe logging
- Automatic batching & retry
- Context support for tracing
Official SDK for PHP 8.1+ applications
- Symfony & PSR-15 middleware
- Strict types & enums
- Auto-shutdown handling
Official SDK for Java & Kotlin applications
- Spring Boot auto-configuration
- Kotlin coroutine support
- Annotation-based tracing
Official SDK for .NET 8+ applications
- ASP.NET Core middleware
- Dependency injection support
- Minimal API integration
First-class Laravel integration package
- Auto-discovery & zero config
- Queue & job tracing
- Blade directive support
Official SDK for Ruby 2.7+ and Rails applications
- Rails Railtie auto-configuration
- Sidekiq & Redis tracing
- Security scanning built-in
💡 Use Cases
Debug Production Issues
Customer reports error? Set breakpoint to see exact state next time it happens.
Performance Investigation
Capture input size and timing to find what causes slowdowns.
Verify Calculations
Track money flows through complex pipelines to ensure correctness.
🔧 Troubleshooting
No snapshots captured?
• Check breakpoint is enabled
• Verify file path matches
• Confirm line number is correct
• Ensure service name matches
Performance concerns?
• Use max_captures to limit total captures
• Set capture_frequency for sampling
• Set short expiration times