sentry-php-sdk

Automate Sentry PHP SDK setup for plain PHP, Laravel, and Symfony projects.

246|29|Updated Nov 10, 2025
One-click install
npx skills add https://github.com/getsentry/sentry-for-ai --skill sentry-php-sdk
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sentry-php-sdk
Source: https://github.com/getsentry/sentry-for-ai/tree/main/skills/sentry-php-sdk
Command: npx skills add https://github.com/getsentry/sentry-for-ai --skill sentry-php-sdk

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill automates the Sentry PHP SDK setup for PHP projects, guiding you through detection, installation, DSN publishing, and initialization to enable error monitoring, tracing, profiling, logging, metrics, and cron monitoring across plain PHP, Laravel, and Symfony.

Core Features & Use Cases

  • Automatic project detection and SDK selection: identifies your PHP environment (plain PHP, Laravel, or Symfony) and recommends the right Sentry packages.
  • End-to-end setup phases: provides guidance from installation to verification, including composer dependencies and config publishing.
  • Framework-specific initialization: offers Laravel and Symfony initialization steps and cross-feature enablement for tracing, logs, metrics, and profiling.
  • Real-world workflows: supports common scenarios like adding error monitoring to PHP apps and enabling distributed tracing in multi-service stacks.

Quick Start

Install the appropriate Sentry PHP SDK, configure DSN and environment, then initialize Sentry to enable error monitoring in your PHP app.

Frequently Asked Questions about sentry-php-sdk

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

FAQPage Schema
How do I set up Sentry error monitoring in a PHP application?

Sentry error monitoring in a PHP application is set up by installing the correct composer package, publishing your DSN, and initializing the provider to capture errors automatically.

Can I enable distributed tracing and profiling in Laravel or Symfony?

Distributed tracing and profiling can be enabled in Laravel or Symfony through framework-specific initialization steps that activate these features alongside core error monitoring.

What is the process for configuring the Sentry PHP SDK with composer?

Configuring the Sentry PHP SDK with composer involves installing the recommended package, publishing configuration with your DSN, and initializing the provider within your plain PHP, Laravel, or Symfony app.

Does Sentry SDK support cron monitoring and custom logging for PHP projects?

Sentry SDK supports cron monitoring and custom logging for PHP projects by applying initialization steps that enable these features alongside tracing and metrics during setup.

What's the best way to automate Sentry initialization across different PHP frameworks?

Automating Sentry initialization across different PHP frameworks is best done by detecting the environment to recommend packages, then applying framework-specific initialization for plain PHP, Laravel, or Symfony.

Why do I need to publish a DSN when adding Sentry to my PHP app?

Publishing a DSN when adding Sentry to your PHP app is required to link your project to your Sentry account, enabling core monitoring by securely routing error and tracing data.