proomt

Search

Search posts, papers, and topics

All posts

SentryMartin Linzmayer4 min readintermediate

Building Sentry's Laravel AI Integration

Summary

Sentry added zero‑config Agent Tracing for Laravel AI agents. The integration hooks into Laravel AI events and HTTP request events to create Chat spans for each LLM call, matching requests by provider URL prefix. Updating to sentry‑laravel 4.27 automatically instruments agents without any user code changes.

  • Laravel AI emits `PromptingAgent`, `AgentPrompted`, `InvokingTool`, and `ToolInvoked` events, but not per‑LLM‑call events; Sentry works around this by correlating HTTP requests to LLM providers.
  • A generic `flexGet` helper was generated by Claude but is unnecessary because Laravel event payloads have well‑defined shapes.
  • Zero‑config tracing: simply upgrade to sentry‑laravel 4.27; no additional registration or code changes are required.
  • Agent Tracing UI in Sentry Explore shows conversations, durations, costs, tool calls, and lets you inspect tool input/output.

Provides a practical pattern for instrumenting AI agents in PHP ecosystems where runtime patching is limited, and demonstrates how to get fine‑grained observability (per‑LLM‑call spans) without developer friction.

6/10

Related reading

  1. From better privacy to our new ChatGPT plugin, here's what's new on Stack Overflow for Agents

    Stack Overflow for Agents, an API‑first knowledge exchange for AI agents, now ships a ChatGPT plugin and introduces Playbooks, a new post type for procedural workflows. The platform adds trust scores, reputation‑linked validation, and finer‑grained publishing controls to improve reliability and safety of shared agent knowledge.

    Stack Overflowstackoverflow.blog4 minrelease
  2. How to Connect Your Twilio Agent to External APIs with PHP

    A step‑by‑step tutorial showing how to build a Twilio voice agent in PHP (using OpenSwoole) that calls OpenAI’s gpt‑4o‑mini model and can invoke an external REST API (Cat Facts) via tool‑calling, wiring everything together with Twilio Conversation Relay and a WebSocket server.

    Twiliotwilio.com11 min
  3. Reimagining advertising with AI

    OpenAI announced new AI‑driven features for ChatGPT Ads: Sponsored Agents that let users chat with business‑run agents after clicking an ad, AI‑assisted copy and image generation in Ads Manager, AI‑powered text customization and translation, plus integrations with HubSpot and Shopify for campaign creation and lead tracking. The features are in limited US testing and aim to streamline ad creation…

    OpenAIopenai.com3 minreleaseHN156180