Skip to content

docs(laravel): Add AI monitoring guide#18512

Open
constantinius wants to merge 2 commits into
masterfrom
constantinius/docs/laravel/ai-monitoring
Open

docs(laravel): Add AI monitoring guide#18512
constantinius wants to merge 2 commits into
masterfrom
constantinius/docs/laravel/ai-monitoring

Conversation

@constantinius

Copy link
Copy Markdown
Contributor

DESCRIBE YOUR PR

Adds docs for Laravel AI agent monitoring with sentry/sentry-laravel.

  • Adds a Laravel AI integration page covering setup, verification, captured spans, conversations, and feature flags
  • Links Laravel from the AI Agent Monitoring setup and Conversations docs
  • Notes Laravel AI automatic instrumentation in the Laravel tracing docs

Contributes to TET-2516

IS YOUR CHANGE URGENT?

Help us prioritize incoming PRs by letting us know when the change needs to go live.

  • Urgent deadline (GA date, etc.):
  • Other deadline:
  • None: Not urgent, can wait up to 1 week+

SLA

  • Teamwork makes the dream work, so please add a reviewer to your PRs.
  • Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it.
    Thanks in advance for your help!

PRE-MERGE CHECKLIST

Make sure you've checked the following before merging your changes:

  • Checked Vercel preview for correctness, including links
  • PR was reviewed and approved by any necessary SMEs (subject matter experts)
  • PR was reviewed and approved by a member of the Sentry docs team

@linear-code

linear-code Bot commented Jun 23, 2026

Copy link
Copy Markdown

TET-2516

@vercel

vercel Bot commented Jun 23, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sentry-docs Ready Ready Preview, Comment Jun 26, 2026 6:31am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
develop-docs Ignored Ignored Preview Jun 26, 2026 6:31am

Request Review

Document Laravel AI agent monitoring support, including setup, verification, conversation tracking, and feature flags. Link the new guide from AI Monitoring and Conversations docs so users can discover the integration.
Comment thread docs/platforms/php/guides/laravel/integrations/laravel-ai.mdx Outdated

@coolguyzone coolguyzone left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks for the update 🫡

Co-authored-by: Alex Krawiec <alex.krawiec@sentry.io>

namespace App\Ai\Tools;

use Illuminate\Contracts\JsonSchema\JsonSchema;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The documentation uses Illuminate\Contracts\JsonSchema\JsonSchema, which is only available in Laravel 13+, but claims support for Laravel 12.x, causing a "class not found" error.
Severity: MEDIUM

Suggested Fix

The documentation should be corrected. Either update the prerequisite to require Laravel 13.x or later, or find the correct namespace for the JsonSchema contract within the laravel/ai 0.x community package and update the code example accordingly.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: docs/platforms/php/guides/laravel/integrations/laravel-ai.mdx#L92

Potential issue: The code example in the Laravel AI integration guide imports
`Illuminate\Contracts\JsonSchema\JsonSchema`. This namespace is part of the core Laravel
framework and was introduced in version 13. However, the guide's prerequisites state it
supports Laravel 12.x and the community `laravel/ai` 0.x package. Users on a Laravel
12.x installation who follow this guide will encounter a fatal "class not found" error
at runtime, as the specified `JsonSchema` contract does not exist in their environment.
This makes the provided code example unusable for the documented minimum supported
version.

Did we get this right? 👍 / 👎 to inform future reviews.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants