add-ai-integration

Instrument new AI providers in the Sentry JavaScript SDK using Gen AI Conventions.

8.7k|1.8k|Updated Feb 1, 2012
One-click install
npx skills add https://github.com/getsentry/sentry-javascript --skill add-ai-integration
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-ai-integration
Source: https://github.com/getsentry/sentry-javascript/tree/main/.agents/skills/add-ai-integration
Command: npx skills add https://github.com/getsentry/sentry-javascript --skill add-ai-integration

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill streamlines the process of adding new AI provider integrations to the Sentry JavaScript SDK, ensuring consistent and robust instrumentation for AI-driven features.

Core Features & Use Cases

  • New AI Integration: Add support for new AI services like OpenAI, Anthropic, Vercel AI, LangChain, etc.
  • Existing Integration Modification: Update or improve instrumentation for already supported AI providers.
  • Use Case: A developer wants to add support for a new LLM provider, 'AwesomeAI', to Sentry. They would use this skill to follow the established patterns for instrumenting the 'AwesomeAI' client and ensure spans are correctly generated for AI interactions.

Quick Start

Use the add-ai-integration skill to add support for the 'AwesomeAI' provider.

Frequently Asked Questions about add-ai-integration

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

FAQPage Schema
How do I add AI integration tracing for a new LLM provider in the Sentry JavaScript SDK?

AI integration tracing is added by following structured patterns to instrument the AI client and generate spans for interactions, enforcing Sentry Gen AI Conventions for consistent error reporting.

Can I use this to update instrumentation for already supported AI providers like OpenAI or LangChain?

Yes, you can use this to modify existing AI provider instrumentation, allowing you to update and improve tracing and error reporting for already supported services like OpenAI and LangChain.

What are Sentry Gen AI Conventions and do I need them for AI instrumentation?

Sentry Gen AI Conventions are enforced standards for attribute management and data truncation required for AI instrumentation to ensure consistent tracing and error reporting across JavaScript runtimes.

How does AI error reporting work across different JavaScript runtimes with Sentry?

AI error reporting across JavaScript runtimes uses shared SDK utilities for attribute management and data truncation, applying structured patterns to maintain consistent tracing for various AI services.

What is the best way to ensure consistent spans are generated for AI interactions in JavaScript?

The best way to ensure consistent spans for AI interactions is to apply Sentry's shared utilities for attribute management and enforce Gen AI Conventions when integrating new AI providers into the JavaScript SDK.

Are there limitations when adding new AI provider instrumentation to the Sentry SDK?

Limitations when adding new AI provider instrumentation include the strict requirement to use Sentry Gen AI Conventions and shared utilities for data truncation to ensure compatibility across different JavaScript runtimes.