/api-observability-setup-axiom-pino-sentry
Pino, Axiom, Sentry installation - one-time project setup for logging and error tracking with source maps upload
$ npx -y skills add agents-inc/skills --skill api-observability-setup-axiom-pino-sentry --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/api-observability-setup-axiom-pino-sentry
Context preview
The summary Claude sees to decide when to auto-load this skill.
Pino, Axiom, Sentry installation - one-time project setup for logging and error tracking with source maps upload
SKILL.md
api-observability-setup-axiom-pino-sentry.SKILL.mdname: api-observability-setup-axiom-pino-sentry
description: Pino, Axiom, Sentry installation - one-time project setup for logging and error tracking with source maps upload
Observability Setup (Pino + Axiom + Sentry)
> **Quick Guide:** One-time project setup for observability. Install `pino`, `next-axiom`, `@sentry/nextjs`. Configure Axiom dataset + Vercel integration. Set up Sentry DSN and config files. Wrap `next.config.ts` with `withAxiom` then `withSentryConfig`. Add `instrumentation.ts` for runtime-specific Sentry init. Source maps are uploaded automatically when `SENTRY_AUTH_TOKEN` is set in CI.
---
**Detailed Resources:**
- For code examples, see [examples/](examples/) folder:
- [examples/core.md](examples/core.md) - Dependencies, env vars, next.config.ts, instrumentation
- [examples/sentry-config.md](examples/sentry-config.md) - Sentry configuration files (client, server, edge)
- [examples/pino-logger.md](examples/pino-logger.md) - Pino logger setup with redaction
- [examples/axiom-integration.md](examples/axiom-integration.md) - Web Vitals and dashboard queries
- [examples/ci-cd.md](examples/ci-cd.md) - GitHub Actions source maps upload
- [examples/health-check.md](examples/health-check.md) - Health check endpoints
- For decision frameworks and anti-patterns, see [reference.md](reference.md)
---
<critical_requirements>
CRITICAL: Before Using This Skill
> **All code must follow project conventions in CLAUDE.md** (kebab-case, named exports, import ordering, `import type`, named constants)
**(You MUST create separate Axiom datasets for each environment - development, staging, production)**
**(You MUST configure all three Sentry config files - `sentry.client.config.ts`, `sentry.server.config.ts`, `sentry.edge.config.ts`)**
**(You MUST add source maps upload to CI/CD - Sentry needs source maps for readable stack traces)**
**(You MUST install `pino-pretty` as a devDependency only - never use in production)**
</critical_requirements>
---
**Auto-detection:** pino, next-axiom, @sentry/nextjs, Axiom, Sentry, observability setup, logging setup, error tracking setup, source maps, sentry.client.config, sentry.server.config, sentry.edge.config, withAxiom, withSentryConfig
**When to use:**
- Setting up a new project that needs logging and error tracking
- Adding observability to an existing project without it
- Migrating from another logging/error tracking solution to Axiom + Sentry
**When NOT to use:**
- Adding new log statements to existing code (ongoing usage, not initial setup)
- Configuring alerts, monitors, or dashboards after initial setup
- Debugging production issues with existing observability
**Key patterns covered:**
- Dependency installation (Pino, next-axiom, @sentry/nextjs, pino-pretty)
- Environment variables template (`.env.example`)
- `next.config.ts` with `withAxiom()` and `withSentryConfig()` wrappers
- Sentry configuration files (client, server, edge)
- `instrumentation.ts` for Sentry initialization
- GitHub Actions for source maps upload
- Pino logger with development/production modes
- Health check endpoints
- Initial Axiom dashboard setup
---
<philosophy>
Philosophy
**Observability is not optional for production apps.** Without logging and error tracking, debugging production issues becomes guesswork. The Pino + Axiom + Sentry stack provides:
- **Pino**: Fast structured JSON logging (5x faster than Winston)
- **Axiom**: Unified logs, traces, and metrics with Vercel integration
- **Sentry**: Error tracking with source maps and release tracking
**This skill covers one-time setup only.** For ongoing usage patterns (log levels, structured fields, correlation IDs, alert configuration), use your observability usage skill.
</philosophy>
---
<patterns>
Core Patterns
Pattern 1: Dependency Installation
Install all observability packages with correct dependency types.
# Production dependencies
npm install pino next-axiom @sentry/nextjs
# Development dependencies (pretty printing for local dev)
npm install -D pino-pretty
**Why:** `pino-pretty` as devDependency prevents production bundle bloat (~500KB), all core packages are production dependencies for runtime use.
For detailed code examples with good/bad comparisons, see [examples/core.md](examples/core.md#pattern-1-dependency-installation).
---
Pattern 2: Environment Variables Template
Create `.env.example` with all required observability variables documented. Group by service, use comments to explain where to get each value, and maintain separate datasets per environment.
Key variables needed:
- `NEXT_PUBLIC_AXIOM_DATASET` - Dataset name (e.g., `myapp-dev`, `myapp-prod`)
- `NEXT_PUBLIC_AXIOM_TOKEN` - API token with ingest permission
- `NEXT_PUBLIC_SENTRY_DSN` - Sentry DSN from project settings
- `SENTRY_AUTH_TOKEN` - For source maps upload in CI
- `SENTRY_ORG` / `SENTRY_PROJECT` - Organization and project slugs
For complete template with all variables, see [examples/core.md](examples/core.md#pattern-2-environment-variables-template).
---
Pattern 3: next.config.ts with withAxiom and withSentryConfig
Wrap Next.js config with `withAxiom` for logging integration, then `withSentryConfig` for source map handling.
Key configuration points:
- `withAxiom` wraps first (inner), Sentry wraps outer
- `silent: !process.env.CI` suppresses source map upload logs locally
- Source maps are hidden by default in v9+ (no `hideSourceMaps` needed)
- Use `sourcemaps.deleteSourcemapsAfterUpload` to clean up after upload
import { withSentryConfig } from "@sentry/nextjs";
import { withAxiom } from "next-axiom";
const nextConfig = {
/* your config */
};
export default withSentryConfig(withAxiom(nextConfig), {
org: process.env.SENTRY_ORG,
project: process.env.SENTRY_PROJECT,
authToken: process.env.SENTRY_AUTH_TOKEN,
silent: !process.env.CI,
});For complete configuration example, see [examples/core.md](examples/core.md#patt
Read more
name: api-observability-setup-axiom-pino-sentry description: Pino, Axiom, Sentry installation - one-time project setup for logging and error tracking with source maps upload
Observability Setup (Pino + Axiom + Sentry)
> **Quick Guide:** One-time project setup for observability. Install `pino`, `next-axiom`, `@sentry/nextjs`. Configure Axiom dataset + Vercel integration. Set up Sentry DSN and config files. Wrap `next.config.ts` with `withAxiom` then `withSentryConfig`. Add `instrumentation.ts` for runtime-specific Sentry init. Source maps are uploaded automatically when `SENTRY_AUTH_TOKEN` is set in CI.
---
**Detailed Resources:**
- For code examples, see [examples/](examples/) folder:
- [examples/core.md](examples/core.md) - Dependencies, env vars, next.config.ts, instrumentation
- [examples/sentry-config.md](examples/sentry-config.md) - Sentry configuration files (client, server, edge)
- [examples/pino-logger.md](examples/pino-logger.md) - Pino logger setup with redaction
- [examples/axiom-integration.md](examples/axiom-integration.md) - Web Vitals and dashboard queries
- [examples/ci-cd.md](examples/ci-cd.md) - GitHub Actions source maps upload
- [examples/health-check.md](examples/health-check.md) - Health check endpoints
- For decision frameworks and anti-patterns, see [reference.md](reference.md)
---
<critical_requirements>
CRITICAL: Before Using This Skill
> **All code must follow project conventions in CLAUDE.md** (kebab-case, named exports, import ordering, `import type`, named constants)
**(You MUST create separate Axiom datasets for each environment - development, staging, production)**
**(You MUST configure all three Sentry config files - `sentry.client.config.ts`, `sentry.server.config.ts`, `sentry.edge.config.ts`)**
**(You MUST add source maps upload to CI/CD - Sentry needs source maps for readable stack traces)**
**(You MUST install `pino-pretty` as a devDependency only - never use in production)**
</critical_requirements>
---
**Auto-detection:** pino, next-axiom, @sentry/nextjs, Axiom, Sentry, observability setup, logging setup, error tracking setup, source maps, sentry.client.config, sentry.server.config, sentry.edge.config, withAxiom, withSentryConfig
**When to use:**
- Setting up a new project that needs logging and error tracking
- Adding observability to an existing project without it
- Migrating from another logging/error tracking solution to Axiom + Sentry
**When NOT to use:**
- Adding new log statements to existing code (ongoing usage, not initial setup)
- Configuring alerts, monitors, or dashboards after initial setup
- Debugging production issues with existing observability
**Key patterns covered:**
- Dependency installation (Pino, next-axiom, @sentry/nextjs, pino-pretty)
- Environment variables template (`.env.example`)
- `next.config.ts` with `withAxiom()` and `withSentryConfig()` wrappers
- Sentry configuration files (client, server, edge)
- `instrumentation.ts` for Sentry initialization
- GitHub Actions for source maps upload
- Pino logger with development/production modes
- Health check endpoints
- Initial Axiom dashboard setup
---
<philosophy>
Philosophy
**Observability is not optional for production apps.** Without logging and error tracking, debugging production issues becomes guesswork. The Pino + Axiom + Sentry stack provides:
- **Pino**: Fast structured JSON logging (5x faster than Winston)
- **Axiom**: Unified logs, traces, and metrics with Vercel integration
- **Sentry**: Error tracking with source maps and release tracking
**This skill covers one-time setup only.** For ongoing usage patterns (log levels, structured fields, correlation IDs, alert configuration), use your observability usage skill.
</philosophy>
---
<patterns>
Core Patterns
Pattern 1: Dependency Installation
Install all observability packages with correct dependency types.
# Production dependencies npm install pino next-axiom @sentry/nextjs # Development dependencies (pretty printing for local dev) npm install -D pino-pretty
**Why:** `pino-pretty` as devDependency prevents production bundle bloat (~500KB), all core packages are production dependencies for runtime use.
For detailed code examples with good/bad comparisons, see [examples/core.md](examples/core.md#pattern-1-dependency-installation).
---
Pattern 2: Environment Variables Template
Create `.env.example` with all required observability variables documented. Group by service, use comments to explain where to get each value, and maintain separate datasets per environment.
Key variables needed:
- `NEXT_PUBLIC_AXIOM_DATASET` - Dataset name (e.g., `myapp-dev`, `myapp-prod`)
- `NEXT_PUBLIC_AXIOM_TOKEN` - API token with ingest permission
- `NEXT_PUBLIC_SENTRY_DSN` - Sentry DSN from project settings
- `SENTRY_AUTH_TOKEN` - For source maps upload in CI
- `SENTRY_ORG` / `SENTRY_PROJECT` - Organization and project slugs
For complete template with all variables, see [examples/core.md](examples/core.md#pattern-2-environment-variables-template).
---
Pattern 3: next.config.ts with withAxiom and withSentryConfig
Wrap Next.js config with `withAxiom` for logging integration, then `withSentryConfig` for source map handling.
Key configuration points:
- `withAxiom` wraps first (inner), Sentry wraps outer
- `silent: !process.env.CI` suppresses source map upload logs locally
- Source maps are hidden by default in v9+ (no `hideSourceMaps` needed)
- Use `sourcemaps.deleteSourcemapsAfterUpload` to clean up after upload
import { withSentryConfig } from "@sentry/nextjs";
import { withAxiom } from "next-axiom";
const nextConfig = {
/* your config */
};
export default withSentryConfig(withAxiom(nextConfig), {
org: process.env.SENTRY_ORG,
project: process.env.SENTRY_PROJECT,
authToken: process.env.SENTRY_AUTH_TOKEN,
silent: !process.env.CI,
});For complete configuration example, see [examples/core.md](examples/core.md#patt
Showing the first part of this file.
The official skills marketplace for Agents Inc. 150+ skills covering everything from React and Prisma to Redis, ElevenLabs, and infrastructure tooling. Pick the skills that match your stack and install them via Claude Code. Need more control?
Repo: agents-inc/skills
Other skills on agents-inc-skills.
- /ai-infrastructure-huggingface-inference
Hugging Face Inference SDK patterns for TypeScript/Node.js — InferenceClient setup, chat completion, text generation, streaming, embeddings, image generation, audio transcription, translation, summarization, and Inference Endpoints
Open skill - /ai-infrastructure-litellm
LiteLLM proxy server setup, TypeScript client patterns via OpenAI SDK, model routing, fallbacks, load balancing, spend tracking, virtual keys, and production deployment
Open skill - /ai-infrastructure-modal
Serverless GPU compute platform for AI model deployment — web endpoints, GPU functions, model serving, and TypeScript client patterns
Open skill - /ai-infrastructure-ollama
Local LLM inference with the Ollama JavaScript client -- chat, streaming, tool calling, vision, embeddings, structured output, model management, and OpenAI-compatible endpoint
Open skill - /ai-infrastructure-replicate
Replicate SDK patterns for TypeScript/Node.js -- client setup, predictions, streaming, webhooks, file handling, model versioning, deployments, and training
Open skill - /ai-infrastructure-together-ai
Together AI SDK patterns for TypeScript — client setup, chat completions, streaming, structured output, function calling, embeddings, image generation, fine-tuning, and OpenAI-compatible endpoints
Open skill

