home / skills / andrelandgraf / fullstackrecipes / sentry-setup

sentry-setup skill

/.agents/skills/sentry-setup

This skill guides you through configuring Sentry for errors, performance, and logs, integrating with Pino for automated log forwarding.

npx playbooks add skill andrelandgraf/fullstackrecipes --skill sentry-setup

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
501 B
---
name: sentry-setup
description: Configure Sentry for error tracking, performance monitoring, and log aggregation. Integrates with Pino to forward logs to Sentry automatically.
---

# Sentry Setup

To set up Sentry Setup, refer to the fullstackrecipes MCP server resource:

**Resource URI:** `recipe://fullstackrecipes.com/sentry-setup`

If the MCP server is not configured, fetch the recipe directly:

```bash
curl -H "Accept: text/plain" https://fullstackrecipes.com/api/recipes/sentry-setup
```

Overview

This skill configures Sentry for error tracking, performance monitoring, and log aggregation in TypeScript full-stack apps. It provides production-ready integration patterns and step-by-step recipes to get Sentry collecting errors, traces, and structured logs quickly. Built to work with Pino, it can forward logs automatically to Sentry for unified observability.

How this skill works

The skill installs and configures the Sentry SDK for server and client environments, applies recommended performance sampling, and wires up transaction and span creation where appropriate. It adds a Pino transport that forwards logs and error objects to Sentry with proper context and severity mapping. Configuration is delivered as a recipe you can fetch from the fullstackrecipes resource server or retrieve directly via a simple HTTP fetch when the registry is not available.

When to use it

  • You need centralized error tracking and performance insights for a TypeScript full-stack app.
  • You want automatic forwarding of Pino logs to Sentry with proper context and levels.
  • You are preparing an app for production and need battle-tested integration patterns.
  • You need step-by-step, repeatable setup instructions for CI/CD and environment-based configuration.

Best practices

  • Use environment-specific DSNs and sample rates; keep production sample rates conservative for cost control.
  • Enrich errors with user and request context before sending to Sentry for actionable traces.
  • Map Pino log levels to Sentry levels consistently and avoid duplicate error captures.
  • Instrument key transactions and long-running operations for performance monitoring.
  • Protect secrets and avoid sending sensitive data; use beforeSend filters to redact fields.

Example use cases

  • Set up server-side Sentry in a TypeScript API to capture unhandled exceptions and performance spans.
  • Forward structured Pino logs from a Node service into Sentry to unify logs and errors.
  • Add browser Sentry configuration to trace frontend transactions and link them to backend spans.
  • Follow the recipe to add Sentry to CI/CD deployments with environment-aware configuration.

FAQ

How do I fetch the setup recipe if the registry is unavailable?

You can fetch the recipe directly from the fullstackrecipes public endpoint using a standard HTTP GET request to retrieve the step-by-step instructions and configuration snippets.

Does this support Pino out of the box?

Yes. The integration includes a Pino transport and mapping guidance so logs are forwarded to Sentry automatically with proper severity and contextual fields.