🔍 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.

🚀 Supports Go, Java, Kotlin, PHP, Laravel, Node.js, Python & .NET!

🎯 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!

💡 Browse your discovered code in the Code Monitoring page → "Browse Code" tab
1

Send Traces

Your existing traces automatically index code. Stack traces reveal file paths and functions.

2

Browse & Set Breakpoints

Click "Browse Code" to see discovered files/functions, then click "Set Breakpoint" on any location.

3

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/tracekit

Step 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 active

Step 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:

Node.js SDK

Official SDK for Node.js and TypeScript applications

Installation:
npm install @tracekit/node-apm
Features:
  • Express & Fastify middleware
  • Full TypeScript support
  • Automatic batching & retry
View Documentation

Python SDK

Official SDK for Python 3.8+ applications

Installation:
pip install tracekit-apm
Features:
  • Flask, Django & FastAPI middleware
  • Type hints support
  • Context managers for tracing
View Documentation

Go SDK

Official SDK for Go applications

Installation:
go get github.com/Tracekit-Dev/go-sdk
Features:
  • Goroutine-safe logging
  • Automatic batching & retry
  • Context support for tracing
View Documentation

PHP SDK

Official SDK for PHP 8.1+ applications

Installation:
composer require tracekit/php-apm
Features:
  • Symfony & PSR-15 middleware
  • Strict types & enums
  • Auto-shutdown handling
View Documentation

Java SDK

Official SDK for Java & Kotlin applications

Installation (Maven):
<dependency><groupId>dev.tracekit</groupId><artifactId>tracekit-core</artifactId></dependency>
Features:
  • Spring Boot auto-configuration
  • Kotlin coroutine support
  • Annotation-based tracing
View Documentation

C# / .NET SDK

Official SDK for .NET 8+ applications

Installation:
dotnet add package TraceKit.AspNetCore
Features:
  • ASP.NET Core middleware
  • Dependency injection support
  • Minimal API integration
View Documentation

Laravel SDK

First-class Laravel integration package

Installation:
composer require tracekit/laravel-apm
Features:
  • Auto-discovery & zero config
  • Queue & job tracing
  • Blade directive support
View Documentation

Ruby SDK

Official SDK for Ruby 2.7+ and Rails applications

Installation:
bundle add tracekit
Features:
  • Rails Railtie auto-configuration
  • Sidekiq & Redis tracing
  • Security scanning built-in
View Documentation

💡 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