sentry-cloudflare-sdk

Configure the Sentry SDK for Cloudflare Workers and Pages.

Updated Jun 4, 2026
One-click install
npx skills add https://github.com/achmf/KostaHub --skill sentry-cloudflare-sdk-achmf
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sentry-cloudflare-sdk
Source: https://github.com/achmf/KostaHub/tree/main/.agents/skills/sentry-cloudflare-sdk
Command: npx skills add https://github.com/achmf/KostaHub --skill sentry-cloudflare-sdk-achmf

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @sentry/cloudflare, @sentry/vite-plugin, and includes references (resource) components.

What problem does it solve?

This skill eliminates the complexity of manually configuring error monitoring, tracing, and performance tracking across the diverse and distributed architecture of Cloudflare Workers and Pages.

Core Features & Use Cases

  • Comprehensive Instrumentation: Automatically wraps Workers, Pages, Durable Objects, Queues, and Workflows to capture unhandled exceptions and performance spans.
  • Advanced Observability: Provides structured logging, cron job monitoring, and D1 database query tracing to correlate logs with traces.
  • Use Case: Use this skill to instantly set up full-stack error tracking and distributed tracing for a Hono-based API running on Cloudflare Workers, ensuring you catch exceptions in both your fetch handlers and background Durable Object tasks.

Quick Start

Ask the assistant to add Sentry to your Cloudflare project and follow the guided setup steps for your specific architecture.

Frequently Asked Questions about sentry-cloudflare-sdk

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up error monitoring and distributed tracing for Cloudflare Workers?

To set up error monitoring and distributed tracing for Cloudflare Workers, you configure the Sentry SDK to automatically instrument fetch handlers, Durable Objects, and Queues, capturing unhandled exceptions and performance spans without manual wrapper implementation.

Can I trace D1 database queries and cron jobs in my Cloudflare Pages project?

Yes, you can trace D1 database queries and monitor cron jobs in Cloudflare Pages by instrumenting your project with advanced observability features, which correlate structured logs directly with distributed traces.

Does Sentry observability work with complex Cloudflare architectures like Durable Objects and Workflows?

Sentry observability works with complex Cloudflare architectures by automating wrapper implementation and compatibility flag configuration for Durable Objects and Workflows, ensuring full-stack error tracking across distributed infrastructure.

What is the best way to upload source maps for a Cloudflare Workers application?

The best way to upload source maps for a Cloudflare Workers application is by integrating the Vite plugin during the build process, ensuring production-grade observability by accurately mapping minified errors back to original source code.

How do I configure environment-specific performance sampling for Cloudflare Workers?

You configure environment-specific performance sampling for Cloudflare Workers by adjusting Sentry SDK integration settings, controlling trace sampling rates to ensure optimal observability data collection across different deployment environments.