sentry-setup-ai-monitoring

Configure Sentry tracing for AI SDKs in JavaScript and Python environments.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill addresses the lack of visibility into AI agent performance, token consumption, and LLM call latency, ensuring developers can debug and optimize their AI-powered features effectively.

Core Features & Use Cases

  • Automated Instrumentation: Detects installed AI SDKs like OpenAI, Anthropic, and LangChain to automatically configure Sentry tracing.
  • Advanced Sampling: Implements custom sampling logic to ensure 100% visibility into AI-related transactions while maintaining efficient resource usage.
  • Use Case: Use this skill to monitor token usage and latency for a production chatbot, ensuring that expensive or slow LLM calls are identified and optimized.

Quick Start

Ask the assistant to configure Sentry AI monitoring for the detected AI SDKs in the current project.

Frequently Asked Questions about sentry-setup-ai-monitoring

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

FAQPage Schema
How do I monitor LLM token usage and latency in production?

To monitor LLM token usage and latency, you can configure Sentry observability to automatically detect installed AI SDKs and apply tracing configurations that capture performance data. This allows you to track agent execution lifecycles and identify slow calls.

How do I set up Sentry tracing for OpenAI and LangChain integrations?

Setting up Sentry tracing for OpenAI and LangChain involves detecting the installed AI SDKs and applying appropriate tracing configurations to capture gen_ai span attributes. This automated instrumentation tracks token consumption and agent execution lifecycles.

What is the best way to get full-stack observability for AI agents?

Full-stack observability for AI agents is achieved by implementing custom Sentry sampling logic that ensures 100% visibility into AI-related transactions while managing resource usage. This captures token usage, latency, and execution lifecycle data across JavaScript and Python.

Can I use Sentry to trace AI agent execution lifecycles in both JavaScript and Python?

Yes, you can use Sentry to trace AI agent execution lifecycles across both JavaScript and Python environments. The configuration detects installed SDKs and applies tracing to capture gen_ai span attributes for comprehensive monitoring.

Why do I need custom sampling rates for AI-specific transactions in Sentry?

Custom sampling rates for AI-specific transactions are needed to maintain efficient resource usage while ensuring 100% visibility into expensive LLM calls. This advanced sampling logic captures necessary performance data without overwhelming your system.

Does Sentry AI monitoring automatically detect installed AI SDKs?

Yes, Sentry AI monitoring automatically detects installed AI SDKs like OpenAI, Anthropic, and LangChain to configure tracing automatically. This instrumentation ensures token usage, latency, and agent execution lifecycles are captured without manual setup.