Go Framework

Chi Router Observability with TraceKit

Chi embraces the Go stdlib -- but its compositional routing means middleware chains can be deeply nested, subrouters create invisible context boundaries, and Use/With/Group patterns interact in ways that are hard to trace. TraceKit makes Chi's composition visible.

Chi observability challenges

Common problems that Chi developers face in production -- and how TraceKit solves them.

Middleware Composition Chains

Chi's Use(), With(), and Group() patterns let you compose middleware in powerful but complex ways. A handler might run through six middleware layers assembled across three different files. TraceKit traces every middleware in the composition chain so you can see the full pipeline.

Subrouter Trace Boundaries

Chi's Mount() and Route() create subrouters that can break trace context. A request passing from a parent router to a mounted subrouter may lose context if middleware resets it. TraceKit maintains trace continuity across subrouter boundaries.

stdlib Compatibility Blind Spots

Chi is compatible with net/http middleware, but mixing Chi-specific and stdlib middleware can create tracing gaps. Standard http.Handler middleware may not propagate Chi's route context. TraceKit instruments both Chi-native and stdlib-compatible middleware uniformly.

Get started in minutes

Add OpenTelemetry instrumentation to your Chi app with a few lines of code.

import (
    "net/http"
    "github.com/go-chi/chi/v5"
    "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp"
)

func main() {
    r := chi.NewRouter()
    r.Use(func(next http.Handler) http.Handler {
        return otelhttp.NewHandler(next, "my-chi-service")
    })
    // Your routes here
    http.ListenAndServe(":8080", r)
}

See the full Go integration guide

Go Distributed Tracing Guide

Go deeper with our Go distributed tracing guide -- covering common pain points, production patterns, and code examples.

What you get with TraceKit

Distributed Tracing

Trace requests through Chi's compositional router, mounted subrouters, and net/http-compatible middleware. Full visibility into your stdlib-based Go application.

Live Code Monitoring

Set breakpoints in your Chi handlers and middleware. Inspect route context, URL parameters, and middleware chain state in production without redeploying.

Simple Pricing

$29/month flat for your entire Chi application. No per-subrouter fees, no per-handler charges -- one price for full net/http observability.

Ready to add observability to Chi?

Get started with TraceKit in under 5 minutes. $29/month flat -- no per-host fees, no surprises.