tracekit-apm-setup
TraceKit APM Setup
Auth Bootstrap
Do not tell the user to go sign up, log in separately, or manually create an API key before setup. First check for existing TraceKit auth. If ~/.tracekitconfig does not contain the production profile or TRACEKIT_API_KEY is missing, apply the tracekit-auth skill first. Use ./scripts/run-tracekit-auth.sh status to check, then guide the user through the TraceKit email verification flow with register and verify. That flow signs the user into an existing account for that email or creates the account automatically, then saves the returned credentials for the rest of the setup.
This is the entry point skill for TraceKit APM. It detects the user's technology stack, asks which features they want, and routes to the appropriate SDK and feature skills for setup.
When To Use
Use this skill when the user asks to:
- Add TraceKit to their project (without specifying a language/framework)
- Set up APM, observability, or error tracking (general request)
- Get started with TraceKit
- Choose the right TraceKit SDK for their project
Step 1: Detection
Before stack detection, ensure TraceKit auth exists for production setup flows. If the user is not connected yet, apply the tracekit-auth skill first. Do not redirect them to a separate signup or API-key-generation flow. The auth skill should handle the email verification flow, connect the existing account for that email or create it automatically, save the production credentials, and then continue directly with SDK setup.
Scan the project to determine the technology stack:
- Check for
package.json-- Node.js/JavaScript ecosystemnextin dependencies => Usetracekit-nextjs-sdkskillnuxtin dependencies => Usetracekit-nuxt-sdkskill@angular/corein dependencies => Usetracekit-angular-sdkskillreactin dependencies (withoutnext) => Usetracekit-react-sdkskillvuein dependencies (withoutnuxt) => Usetracekit-vue-sdkskillexpress,fastify, or@nestjs/core=> Usetracekit-node-sdkskill- None of the above => Use
tracekit-browser-sdkskill (vanilla JS/TS)
- Check for
go.mod-- Usetracekit-go-sdkskill - Check for
requirements.txtorpyproject.toml-- Usetracekit-python-sdkskill - Check for
composer.json-- PHP ecosystemlaravel/frameworkin require => Usetracekit-laravel-sdkskill- Otherwise => Use
tracekit-php-sdkskill
- Check for
pom.xmlorbuild.gradle-- Usetracekit-java-sdkskill - Check for
*.csprojor*.sln-- Usetracekit-dotnet-sdkskill - Check for
Gemfile-- Usetracekit-ruby-sdkskill
Step 2: Ask Which Features to Set Up
After detecting the stack, ask the user which TraceKit features they want to enable. Do not assume - present the options and let them choose. Users may want just error tracking, or the full suite.
Present the following feature menu:
Which TraceKit features would you like to set up? (you can pick multiple)
- Error Tracking - Automatic error capture with stack traces and context (included in base SDK setup)
- Distributed Tracing - Request tracing across services with performance monitoring (included in base SDK setup)
- Code Monitoring - Live breakpoints and snapshots for production debugging without redeploying (included in base SDK setup, enable with
enable_code_monitoring=True)- Custom Metrics - Track business KPIs, counters, gauges, and histograms alongside traces
- Session Replay (frontend only) - Record and replay user sessions linked to traces
- Source Maps (frontend only) - Readable stack traces from minified JavaScript
- Release Tracking - Monitor crash-free rates, deploy health, and regressions per release
- Alerts - Set up notifications for errors, performance degradation, and availability
- All of the above - Full observability suite
Default behavior: If the user says "just set it up" or doesn't specify, set up options 1-3 (Error Tracking, Distributed Tracing, and Code Monitoring) via the base SDK skill. Mention the other features are available and can be added later.
Step 3: Route to Skills
Based on the detected stack and selected features, apply skills in this order:
1. Base SDK Skill (always apply first)
Route to the SDK skill matching the detected stack. This sets up error tracking, distributed tracing, and code monitoring.
Backend SDKs
- Go -
tracekit-go-sdkskill (Gin, Echo, net/http) - Node.js -
tracekit-node-sdkskill (Express, Fastify, NestJS) - Python -
tracekit-python-sdkskill (Django, Flask, FastAPI) - PHP -
tracekit-php-sdkskill - Laravel -
tracekit-laravel-sdkskill - Java -
tracekit-java-sdkskill (Spring Boot, Micronaut) - .NET -
tracekit-dotnet-sdkskill (ASP.NET Core) - Ruby -
tracekit-ruby-sdkskill (Rails, Sinatra)
Frontend SDKs
- Browser (vanilla JS/TS) -
tracekit-browser-sdkskill - React -
tracekit-react-sdkskill (ErrorBoundary, React Router breadcrumbs) - Vue -
tracekit-vue-sdkskill (Vue plugin, Vue Router breadcrumbs) - Angular -
tracekit-angular-sdkskill (NgModule/standalone, DI ErrorHandler) - Next.js -
tracekit-nextjs-sdkskill (multi-runtime, App Router/Pages Router) - Nuxt -
tracekit-nuxt-sdkskill (Nuxt module, defineNuxtPlugin)
2. Feature Skills (apply based on user selection)
After the base SDK is set up, apply additional feature skills as selected:
- Session Replay -
tracekit-session-replayskill (frontend projects only) - Source Maps -
tracekit-source-mapsskill (frontend projects only) - Release Tracking -
tracekit-releasesskill - Alerts -
tracekit-alertsskill - Custom Metrics -
tracekit-custom-metricsskill - Distributed Tracing (multi-service) -
tracekit-distributed-tracingskill (when connecting frontend + backend or multiple services) - Code Monitoring (advanced) -
tracekit-code-monitoringskill (for programmatic snapshots beyond the base setup)
References
- TraceKit docs root:
https://app.tracekit.dev/docs - Dashboard:
https://app.tracekit.dev - Quick start:
https://app.tracekit.dev/docs/quickstart
More from tracekit-dev/tracekit-for-ai
tracekit-code-monitoring
Enable live breakpoints and snapshots for production debugging with TraceKit Code Monitoring. Works with all backend SDKs. Use when the user asks to debug production code, set breakpoints, capture variable state, or enable code monitoring.
9tracekit-alerts
Set up alerting rules and notification channels in TraceKit for errors, performance degradation, and availability monitoring. Covers dashboard setup, API-based rules, Slack integration, and a starter kit of recommended alerts. Use when the user asks about alerts, notifications, error spikes, latency monitoring, or uptime.
8tracekit-browser-sdk
Sets up TraceKit APM in vanilla JavaScript/TypeScript applications for automatic error capture, breadcrumbs, performance monitoring, and distributed tracing. Use when the user has a plain HTML/JS, Web Components, or vanilla TypeScript project without a framework like React, Vue, or Angular.
8tracekit-react-sdk
Sets up TraceKit APM in React applications with error boundaries, component performance tracking, and distributed tracing. Use when the user asks to add TraceKit, add observability, instrument a React app, or configure APM in a React/TypeScript project.
8tracekit-nextjs-sdk
Sets up TraceKit APM in Next.js applications with multi-runtime support, error boundaries, and distributed tracing. Covers both App Router and Pages Router architectures.
8tracekit-session-replay
Set up TraceKit Session Replay to record and replay user sessions with linked distributed traces. Covers privacy settings, sampling rates, and GDPR compliance. Use when the user asks to record sessions, replay user interactions, or debug user-reported issues visually.
8