From 67a3cdd7a14c6f7635b6828bc58a9954a776280c Mon Sep 17 00:00:00 2001 From: Cody De Arkland Date: Tue, 24 Feb 2026 21:13:02 -0800 Subject: [PATCH 1/4] Refactor AI code editor rules to use Sentry Agent Skills Replace copy-paste code snippet rules with agent skill install guidance across SDK documentation pages. Instead of providing static markdown rules files, users are now directed to install skills from getsentry/sentry-agent-skills via dotagents or npx skills. - Replace llm-rules-platform code snippets (JS, React, Next.js, Node.js) with concise agent skills expandables - Replace llm-rules-logs code snippets with sentry-setup-logging skill - Add sentry-setup-tracing skill to all tracing setup pages - Add sentry-setup-logging skill to all logs setup pages - Add sentry-setup-metrics skill to all metrics setup pages - Add sentry-setup-ai-monitoring skill to AI agent monitoring pages - Covers JavaScript, Python, Ruby, and .NET platforms Co-Authored-By: Claude --- docs/platforms/dotnet/common/logs/index.mdx | 18 +++ .../platforms/dotnet/common/metrics/index.mdx | 18 +++ .../platforms/dotnet/common/tracing/index.mdx | 18 +++ .../common/ai-agent-monitoring/index.mdx | 18 +++ .../javascript/common/metrics/index.mdx | 18 +++ .../javascript/common/tracing/index.mdx | 18 +++ .../javascript/guides/nextjs/logs/index.mdx | 18 +++ .../guides/nextjs/tracing/index.mdx | 18 +++ .../integrations/openai-agents/index.mdx | 18 +++ docs/platforms/python/logs/index.mdx | 18 +++ docs/platforms/python/metrics/index.mdx | 18 +++ docs/platforms/python/tracing/index.mdx | 18 +++ .../ai-agents-module.mdx | 18 +++ docs/platforms/ruby/common/metrics/index.mdx | 18 +++ docs/platforms/ruby/common/tracing/index.mdx | 18 +++ docs/platforms/ruby/logs/index.mdx | 18 +++ platform-includes/llm-rules-logs/_default.mdx | 17 +++ .../llm-rules-logs/javascript.nextjs.mdx | 65 +-------- .../llm-rules-logs/javascript.node.mdx | 65 +-------- .../llm-rules-logs/javascript.react.mdx | 63 +------- .../llm-rules-platform/_default.mdx | 136 +---------------- .../llm-rules-platform/javascript.nextjs.mdx | 137 +----------------- .../llm-rules-platform/javascript.node.mdx | 131 +---------------- .../llm-rules-platform/javascript.react.mdx | 129 +---------------- 24 files changed, 361 insertions(+), 670 deletions(-) create mode 100644 platform-includes/llm-rules-logs/_default.mdx diff --git a/docs/platforms/dotnet/common/logs/index.mdx b/docs/platforms/dotnet/common/logs/index.mdx index 8c6dfa342bf3c8..4eecfb0c964865 100644 --- a/docs/platforms/dotnet/common/logs/index.mdx +++ b/docs/platforms/dotnet/common/logs/index.mdx @@ -12,6 +12,24 @@ notSupported: - dotnet.xamarin --- + + +Install Sentry's [agent skills](/ai/agent-skills/) to teach your AI coding assistant how to set up logging in your .NET application. + +### Install Skills + +```bash {tabTitle: dotagents} +npx @sentry/dotagents add getsentry/sentry-agent-skills --name sentry-setup-logging +``` + +```bash {tabTitle: npx skills} +npx skills add getsentry/sentry-agent-skills --skill sentry-setup-logging +``` + +See the [full list of available skills](https://skills.sh/getsentry/sentry-agent-skills) and [installation docs](/ai/agent-skills/) for more details. + + + With Sentry Structured Logs, you can send text-based log information from your applications to Sentry. Once in Sentry, these logs can be viewed alongside relevant errors, searched by text-string, or searched using their individual attributes. ## Requirements diff --git a/docs/platforms/dotnet/common/metrics/index.mdx b/docs/platforms/dotnet/common/metrics/index.mdx index e4c794598b2d7b..c93ce678db6bd5 100644 --- a/docs/platforms/dotnet/common/metrics/index.mdx +++ b/docs/platforms/dotnet/common/metrics/index.mdx @@ -7,6 +7,24 @@ sidebar_section: features beta: true --- + + +Install Sentry's [agent skills](/ai/agent-skills/) to teach your AI coding assistant how to set up metrics in your .NET application. + +### Install Skills + +```bash {tabTitle: dotagents} +npx @sentry/dotagents add getsentry/sentry-agent-skills --name sentry-setup-metrics +``` + +```bash {tabTitle: npx skills} +npx skills add getsentry/sentry-agent-skills --skill sentry-setup-metrics +``` + +See the [full list of available skills](https://skills.sh/getsentry/sentry-agent-skills) and [installation docs](/ai/agent-skills/) for more details. + + + This feature is currently in open beta. Please reach out on [GitHub](https://github.com/getsentry/sentry/discussions/102275) if you have diff --git a/docs/platforms/dotnet/common/tracing/index.mdx b/docs/platforms/dotnet/common/tracing/index.mdx index 27abee1d7f3425..4d09ea21c0501e 100644 --- a/docs/platforms/dotnet/common/tracing/index.mdx +++ b/docs/platforms/dotnet/common/tracing/index.mdx @@ -6,6 +6,24 @@ sidebar_order: 3 sidebar_section: features --- + + +Install Sentry’s [agent skills](/ai/agent-skills/) to teach your AI coding assistant how to set up tracing in your .NET application. + +### Install Skills + +```bash {tabTitle: dotagents} +npx @sentry/dotagents add getsentry/sentry-agent-skills --name sentry-setup-tracing +``` + +```bash {tabTitle: npx skills} +npx skills add getsentry/sentry-agent-skills --skill sentry-setup-tracing +``` + +See the [full list of available skills](https://skills.sh/getsentry/sentry-agent-skills) and [installation docs](/ai/agent-skills/) for more details. + + + With [tracing](/product/insights/overview/), Sentry tracks your software performance, measuring metrics like throughput and latency, and displaying the impact of errors across multiple systems. Sentry captures distributed traces consisting of transactions and spans, which measure individual services and individual operations within those services. Learn more about our model in [Distributed Tracing](/product/sentry-basics/tracing/distributed-tracing/). diff --git a/docs/platforms/javascript/common/ai-agent-monitoring/index.mdx b/docs/platforms/javascript/common/ai-agent-monitoring/index.mdx index f0fe008495215e..ebe3484154f59a 100644 --- a/docs/platforms/javascript/common/ai-agent-monitoring/index.mdx +++ b/docs/platforms/javascript/common/ai-agent-monitoring/index.mdx @@ -31,6 +31,24 @@ supported: With Sentry AI Agent Monitoring, you can monitor and debug your AI systems with full-stack context. You'll be able to track key insights like token usage, latency, tool usage, and error rates. AI Agent Monitoring data will be fully connected to your other Sentry data like logs, errors, and traces. + + +Install Sentry's [agent skills](/ai/agent-skills/) to teach your AI coding assistant how to set up AI Agent Monitoring in your application. + +### Install Skills + +```bash {tabTitle: dotagents} +npx @sentry/dotagents add getsentry/sentry-agent-skills --all +``` + +```bash {tabTitle: npx skills} +npx skills add getsentry/sentry-agent-skills +``` + +See the [full list of available skills](https://skills.sh/getsentry/sentry-agent-skills) and [installation docs](/ai/agent-skills/) for more details. + + + ## Prerequisites Before setting up AI Agent Monitoring, ensure you have tracing enabled in your Sentry configuration. diff --git a/docs/platforms/javascript/common/metrics/index.mdx b/docs/platforms/javascript/common/metrics/index.mdx index bc574dfa58b8d3..8fc76458277c35 100644 --- a/docs/platforms/javascript/common/metrics/index.mdx +++ b/docs/platforms/javascript/common/metrics/index.mdx @@ -10,6 +10,24 @@ notSupported: - javascript.capacitor --- + + +Install Sentry's [agent skills](/ai/agent-skills/) to teach your AI coding assistant how to set up metrics in your application. + +### Install Skills + +```bash {tabTitle: dotagents} +npx @sentry/dotagents add getsentry/sentry-agent-skills --name sentry-setup-metrics +``` + +```bash {tabTitle: npx skills} +npx skills add getsentry/sentry-agent-skills --skill sentry-setup-metrics +``` + +See the [full list of available skills](https://skills.sh/getsentry/sentry-agent-skills) and [installation docs](/ai/agent-skills/) for more details. + + + With [Sentry Metrics](/product/explore/metrics/), you can send counters, gauges, and distributions from your applications to Sentry. Once in Sentry, these metrics can be viewed alongside relevant errors, and searched using their individual attributes. diff --git a/docs/platforms/javascript/common/tracing/index.mdx b/docs/platforms/javascript/common/tracing/index.mdx index 93193790e6670a..7d04016ba49e7e 100644 --- a/docs/platforms/javascript/common/tracing/index.mdx +++ b/docs/platforms/javascript/common/tracing/index.mdx @@ -6,6 +6,24 @@ sidebar_order: 6 sidebar_section: features --- + + +Install Sentry's [agent skills](/ai/agent-skills/) to teach your AI coding assistant how to set up tracing in your application. + +### Install Skills + +```bash {tabTitle: dotagents} +npx @sentry/dotagents add getsentry/sentry-agent-skills --name sentry-setup-tracing +``` + +```bash {tabTitle: npx skills} +npx skills add getsentry/sentry-agent-skills --skill sentry-setup-tracing +``` + +See the [full list of available skills](https://skills.sh/getsentry/sentry-agent-skills) and [installation docs](/ai/agent-skills/) for more details. + + + With [tracing](/product/insights/overview/), Sentry automatically tracks your software performance across your application services, measuring metrics like throughput and latency, and displaying the impact of errors across multiple systems. diff --git a/docs/platforms/javascript/guides/nextjs/logs/index.mdx b/docs/platforms/javascript/guides/nextjs/logs/index.mdx index 862bd2b78f64a9..d0c051c5877a8e 100644 --- a/docs/platforms/javascript/guides/nextjs/logs/index.mdx +++ b/docs/platforms/javascript/guides/nextjs/logs/index.mdx @@ -7,6 +7,24 @@ sidebar_section: features new: true --- + + +Install Sentry's [agent skills](/ai/agent-skills/) to teach your AI coding assistant how to set up logging in your Next.js application. + +### Install Skills + +```bash {tabTitle: dotagents} +npx @sentry/dotagents add getsentry/sentry-agent-skills --name sentry-setup-logging +``` + +```bash {tabTitle: npx skills} +npx skills add getsentry/sentry-agent-skills --skill sentry-setup-logging +``` + +See the [full list of available skills](https://skills.sh/getsentry/sentry-agent-skills) and [installation docs](/ai/agent-skills/) for more details. + + + Sentry Logs let you send structured log data from your Next.js application. Unlike traditional string-based logging, structured logs include queryable attributes that help you debug issues faster by filtering on specific users, orders, or any business context you include. ## Setup diff --git a/docs/platforms/javascript/guides/nextjs/tracing/index.mdx b/docs/platforms/javascript/guides/nextjs/tracing/index.mdx index 4933eb3d444636..ff9ae3dd3fe04e 100644 --- a/docs/platforms/javascript/guides/nextjs/tracing/index.mdx +++ b/docs/platforms/javascript/guides/nextjs/tracing/index.mdx @@ -6,6 +6,24 @@ sidebar_order: 5 sidebar_section: features --- + + +Install Sentry's [agent skills](/ai/agent-skills/) to teach your AI coding assistant how to set up tracing in your Next.js application. + +### Install Skills + +```bash {tabTitle: dotagents} +npx @sentry/dotagents add getsentry/sentry-agent-skills --name sentry-setup-tracing +``` + +```bash {tabTitle: npx skills} +npx skills add getsentry/sentry-agent-skills --skill sentry-setup-tracing +``` + +See the [full list of available skills](https://skills.sh/getsentry/sentry-agent-skills) and [installation docs](/ai/agent-skills/) for more details. + + + Tracing captures the timing and flow of requests through your Next.js application. Learn more about [tracing](/concepts/key-terms/tracing/) and how Sentry uses traces to track performance across services. Sentry automatically instruments most operations, but Server Actions require manual setup. diff --git a/docs/platforms/python/integrations/openai-agents/index.mdx b/docs/platforms/python/integrations/openai-agents/index.mdx index 8280bb2c55e4c6..1e56b23a20a492 100644 --- a/docs/platforms/python/integrations/openai-agents/index.mdx +++ b/docs/platforms/python/integrations/openai-agents/index.mdx @@ -12,6 +12,24 @@ The support for **OpenAI Agents SDK** is in its beta phase. Please test locally This integration connects Sentry with the [OpenAI Python SDK](https://openai.github.io/openai-agents-python/). The integration has been confirmed to work with OpenAI Agents version 0.0.19. + + +Install Sentry's [agent skills](/ai/agent-skills/) to teach your AI coding assistant how to set up AI Agent Monitoring in your Python application. + +### Install Skills + +```bash {tabTitle: dotagents} +npx @sentry/dotagents add getsentry/sentry-agent-skills --all +``` + +```bash {tabTitle: npx skills} +npx skills add getsentry/sentry-agent-skills +``` + +See the [full list of available skills](https://skills.sh/getsentry/sentry-agent-skills) and [installation docs](/ai/agent-skills/) for more details. + + + Once you've installed this SDK, you can use [Sentry AI Agents Insights](https://sentry.io/orgredirect/organizations/:orgslug/insights/ai/agents/), a Sentry dashboard that helps you understand what's going on with your AI agents. Sentry AI Agents monitoring will automatically collect information about agents, tools, prompts, tokens, and models. diff --git a/docs/platforms/python/logs/index.mdx b/docs/platforms/python/logs/index.mdx index 78a03abe74313a..0421fba95d7b45 100644 --- a/docs/platforms/python/logs/index.mdx +++ b/docs/platforms/python/logs/index.mdx @@ -7,6 +7,24 @@ sidebar_section: features new: true --- + + +Install Sentry's [agent skills](/ai/agent-skills/) to teach your AI coding assistant how to set up logging in your Python application. + +### Install Skills + +```bash {tabTitle: dotagents} +npx @sentry/dotagents add getsentry/sentry-agent-skills --name sentry-setup-logging +``` + +```bash {tabTitle: npx skills} +npx skills add getsentry/sentry-agent-skills --skill sentry-setup-logging +``` + +See the [full list of available skills](https://skills.sh/getsentry/sentry-agent-skills) and [installation docs](/ai/agent-skills/) for more details. + + + With Sentry Structured Logs, you can send text-based log information from your applications to Sentry. Once in Sentry, these logs can be viewed alongside relevant errors, searched by text-string, or searched using their individual attributes. ## Requirements diff --git a/docs/platforms/python/metrics/index.mdx b/docs/platforms/python/metrics/index.mdx index 6c65adceb391e1..d038896bdec0f3 100644 --- a/docs/platforms/python/metrics/index.mdx +++ b/docs/platforms/python/metrics/index.mdx @@ -7,6 +7,24 @@ sidebar_section: features beta: true --- + + +Install Sentry's [agent skills](/ai/agent-skills/) to teach your AI coding assistant how to set up metrics in your Python application. + +### Install Skills + +```bash {tabTitle: dotagents} +npx @sentry/dotagents add getsentry/sentry-agent-skills --name sentry-setup-metrics +``` + +```bash {tabTitle: npx skills} +npx skills add getsentry/sentry-agent-skills --skill sentry-setup-metrics +``` + +See the [full list of available skills](https://skills.sh/getsentry/sentry-agent-skills) and [installation docs](/ai/agent-skills/) for more details. + + + This feature is currently in open beta. Please reach out on [GitHub](https://github.com/getsentry/sentry/discussions/102275) if you have feedback or questions. Features in beta are still in-progress and may have bugs. We recognize the irony. diff --git a/docs/platforms/python/tracing/index.mdx b/docs/platforms/python/tracing/index.mdx index acd9cf828c4f40..92b222860a990e 100644 --- a/docs/platforms/python/tracing/index.mdx +++ b/docs/platforms/python/tracing/index.mdx @@ -6,6 +6,24 @@ sidebar_order: 6 sidebar_section: features --- + + +Install Sentry's [agent skills](/ai/agent-skills/) to teach your AI coding assistant how to set up tracing in your Python application. + +### Install Skills + +```bash {tabTitle: dotagents} +npx @sentry/dotagents add getsentry/sentry-agent-skills --name sentry-setup-tracing +``` + +```bash {tabTitle: npx skills} +npx skills add getsentry/sentry-agent-skills --skill sentry-setup-tracing +``` + +See the [full list of available skills](https://skills.sh/getsentry/sentry-agent-skills) and [installation docs](/ai/agent-skills/) for more details. + + + ## Prerequisites * You have the Python SDK installed (version 0.11.2 or higher) diff --git a/docs/platforms/python/tracing/instrumentation/custom-instrumentation/ai-agents-module.mdx b/docs/platforms/python/tracing/instrumentation/custom-instrumentation/ai-agents-module.mdx index bb0f4b0b78675f..2c62b0883db239 100644 --- a/docs/platforms/python/tracing/instrumentation/custom-instrumentation/ai-agents-module.mdx +++ b/docs/platforms/python/tracing/instrumentation/custom-instrumentation/ai-agents-module.mdx @@ -6,6 +6,24 @@ description: "Learn how to manually instrument your code to use Sentry's Agents With Sentry AI Agent Monitoring, you can monitor and debug your AI systems with full-stack context. You'll be able to track key insights like token usage, latency, tool usage, and error rates. AI Agent Monitoring data will be fully connected to your other Sentry data like logs, errors, and traces. + + +Install Sentry's [agent skills](/ai/agent-skills/) to teach your AI coding assistant how to set up AI Agent Monitoring in your Python application. + +### Install Skills + +```bash {tabTitle: dotagents} +npx @sentry/dotagents add getsentry/sentry-agent-skills --all +``` + +```bash {tabTitle: npx skills} +npx skills add getsentry/sentry-agent-skills +``` + +See the [full list of available skills](https://skills.sh/getsentry/sentry-agent-skills) and [installation docs](/ai/agent-skills/) for more details. + + + As a prerequisite to setting up AI Agent Monitoring with Python, you'll need to first set up tracing. Once this is done, the Python SDK will automatically instrument AI agents created with supported libraries. If that doesn't fit your use case, you can use custom instrumentation described below. ## Automatic Instrumentation diff --git a/docs/platforms/ruby/common/metrics/index.mdx b/docs/platforms/ruby/common/metrics/index.mdx index 6c65adceb391e1..7a07cb3e64ea32 100644 --- a/docs/platforms/ruby/common/metrics/index.mdx +++ b/docs/platforms/ruby/common/metrics/index.mdx @@ -7,6 +7,24 @@ sidebar_section: features beta: true --- + + +Install Sentry's [agent skills](/ai/agent-skills/) to teach your AI coding assistant how to set up metrics in your Ruby application. + +### Install Skills + +```bash {tabTitle: dotagents} +npx @sentry/dotagents add getsentry/sentry-agent-skills --name sentry-setup-metrics +``` + +```bash {tabTitle: npx skills} +npx skills add getsentry/sentry-agent-skills --skill sentry-setup-metrics +``` + +See the [full list of available skills](https://skills.sh/getsentry/sentry-agent-skills) and [installation docs](/ai/agent-skills/) for more details. + + + This feature is currently in open beta. Please reach out on [GitHub](https://github.com/getsentry/sentry/discussions/102275) if you have feedback or questions. Features in beta are still in-progress and may have bugs. We recognize the irony. diff --git a/docs/platforms/ruby/common/tracing/index.mdx b/docs/platforms/ruby/common/tracing/index.mdx index 03548a4ffd191d..651d68450494d3 100644 --- a/docs/platforms/ruby/common/tracing/index.mdx +++ b/docs/platforms/ruby/common/tracing/index.mdx @@ -6,6 +6,24 @@ sidebar_order: 6 sidebar_section: features --- + + +Install Sentry’s [agent skills](/ai/agent-skills/) to teach your AI coding assistant how to set up tracing in your Ruby application. + +### Install Skills + +```bash {tabTitle: dotagents} +npx @sentry/dotagents add getsentry/sentry-agent-skills --name sentry-setup-tracing +``` + +```bash {tabTitle: npx skills} +npx skills add getsentry/sentry-agent-skills --skill sentry-setup-tracing +``` + +See the [full list of available skills](https://skills.sh/getsentry/sentry-agent-skills) and [installation docs](/ai/agent-skills/) for more details. + + + With [tracing](/product/insights/overview/), Sentry tracks your software performance, measuring metrics like throughput and latency, and displaying the impact of errors across multiple systems. Sentry captures distributed traces consisting of transactions and spans, which measure individual services and individual operations within those services. Learn more about our model in [Distributed Tracing](/product/sentry-basics/tracing/distributed-tracing/). diff --git a/docs/platforms/ruby/logs/index.mdx b/docs/platforms/ruby/logs/index.mdx index 78a03abe74313a..7ba893c4f5dbc1 100644 --- a/docs/platforms/ruby/logs/index.mdx +++ b/docs/platforms/ruby/logs/index.mdx @@ -7,6 +7,24 @@ sidebar_section: features new: true --- + + +Install Sentry's [agent skills](/ai/agent-skills/) to teach your AI coding assistant how to set up logging in your Ruby application. + +### Install Skills + +```bash {tabTitle: dotagents} +npx @sentry/dotagents add getsentry/sentry-agent-skills --name sentry-setup-logging +``` + +```bash {tabTitle: npx skills} +npx skills add getsentry/sentry-agent-skills --skill sentry-setup-logging +``` + +See the [full list of available skills](https://skills.sh/getsentry/sentry-agent-skills) and [installation docs](/ai/agent-skills/) for more details. + + + With Sentry Structured Logs, you can send text-based log information from your applications to Sentry. Once in Sentry, these logs can be viewed alongside relevant errors, searched by text-string, or searched using their individual attributes. ## Requirements diff --git a/platform-includes/llm-rules-logs/_default.mdx b/platform-includes/llm-rules-logs/_default.mdx new file mode 100644 index 00000000000000..f4619670d8c00d --- /dev/null +++ b/platform-includes/llm-rules-logs/_default.mdx @@ -0,0 +1,17 @@ + + +Install Sentry's [agent skills](/ai/agent-skills/) to teach your AI coding assistant how to set up logging in your application. + +### Install Skills + +```bash {tabTitle: dotagents} +npx @sentry/dotagents add getsentry/sentry-agent-skills --name sentry-setup-logging +``` + +```bash {tabTitle: npx skills} +npx skills add getsentry/sentry-agent-skills --skill sentry-setup-logging +``` + +See the [full list of available skills](https://skills.sh/getsentry/sentry-agent-skills) and [installation docs](/ai/agent-skills/) for more details. + + diff --git a/platform-includes/llm-rules-logs/javascript.nextjs.mdx b/platform-includes/llm-rules-logs/javascript.nextjs.mdx index 6e7c9e79e038ba..40c5f41204579d 100644 --- a/platform-includes/llm-rules-logs/javascript.nextjs.mdx +++ b/platform-includes/llm-rules-logs/javascript.nextjs.mdx @@ -1,66 +1,17 @@ - + -When created as a rules file this should be placed alongside other editor specific rule files. For example, if you are using Cursor, place this file in the `.cursor/rules` directory, or the contents in the `AGENTS.md` or `.cursorrules` (legacy) files. +Install Sentry's [agent skills](/ai/agent-skills/) to teach your AI coding assistant how to set up logging in your Next.js application. -````markdown {filename:rules.mdc} -# Logs +### Install Skills -- Where logs are used, ensure Sentry is imported using `import * as Sentry from "@sentry/nextjs"` -- Enable logging in Sentry using `Sentry.init({ enableLogs: true })` -- Sentry offers a `consoleLoggingIntegration` that can be used to log specific console error types automatically without instrumenting the individual logger calls - -## Configuration - -The Sentry initialization needs to be updated to enable the logs feature. - -### Baseline - -```javascript -import * as Sentry from "@sentry/nextjs"; - -Sentry.init({ - dsn: "https://examplePublicKey@o0.ingest.sentry.io/0", - // Enable logs to be sent to Sentry - enableLogs: true, -}); +```bash {tabTitle: dotagents} +npx @sentry/dotagents add getsentry/sentry-agent-skills --name sentry-setup-logging ``` -### Logger Integration - -```javascript -Sentry.init({ - dsn: "https://examplePublicKey@o0.ingest.sentry.io/0", - enableLogs: true, - integrations: [ - // send console.log, console.warn, and console.error calls as logs to Sentry - Sentry.consoleLoggingIntegration({ levels: ["log", "warn", "error"] }), - ], -}); +```bash {tabTitle: npx skills} +npx skills add getsentry/sentry-agent-skills --skill sentry-setup-logging ``` -## Logger Examples - -`Sentry.logger.fmt` is a template literal function that should be used to bring variables into the structured logs. - -```javascript -import * as Sentry from "@sentry/nextjs"; - -Sentry.logger.trace("Starting database connection", { database: "users" }); -Sentry.logger.debug(Sentry.logger.fmt`Cache miss for user: ${userId}`); -Sentry.logger.info("Updated profile", { profileId: 345 }); -Sentry.logger.warn("Rate limit reached for endpoint", { - endpoint: "/api/results/", - isEnterprise: false, -}); -Sentry.logger.error("Failed to process payment", { - orderId: "order_123", - amount: 99.99, -}); -Sentry.logger.fatal("Database connection pool exhausted", { - database: "users", - activeConnections: 100, -}); -``` -```` +See the [full list of available skills](https://skills.sh/getsentry/sentry-agent-skills) and [installation docs](/ai/agent-skills/) for more details. diff --git a/platform-includes/llm-rules-logs/javascript.node.mdx b/platform-includes/llm-rules-logs/javascript.node.mdx index 1f832c17636f6d..bd9d3eb1fefe20 100644 --- a/platform-includes/llm-rules-logs/javascript.node.mdx +++ b/platform-includes/llm-rules-logs/javascript.node.mdx @@ -1,66 +1,17 @@ - + -When created as a rules file this should be placed alongside other editor specific rule files. For example, if you are using Cursor, place this file in the `.cursor/rules` directory, or the contents in the `AGENTS.md` or `.cursorrules` (legacy) files. +Install Sentry's [agent skills](/ai/agent-skills/) to teach your AI coding assistant how to set up logging in your Node.js application. -````markdown {filename:rules.mdc} -# Logs +### Install Skills -- Where logs are used, ensure Sentry is imported using `import * as Sentry from "@sentry/node"` -- Enable logging in Sentry using `Sentry.init({ enableLogs: true })` -- Sentry offers a `consoleLoggingIntegration` that can be used to log specific console error types automatically without instrumenting the individual logger calls - -## Configuration - -The Sentry initialization needs to be updated to enable the logs feature. - -### Baseline - -```javascript -import * as Sentry from "@sentry/node"; - -Sentry.init({ - dsn: "https://examplePublicKey@o0.ingest.sentry.io/0", - // Enable logs to be sent to Sentry - enableLogs: true, -}); +```bash {tabTitle: dotagents} +npx @sentry/dotagents add getsentry/sentry-agent-skills --name sentry-setup-logging ``` -### Logger Integration - -```javascript -Sentry.init({ - dsn: "https://examplePublicKey@o0.ingest.sentry.io/0", - enableLogs: true, - integrations: [ - // send console.log, console.warn, and console.error calls as logs to Sentry - Sentry.consoleLoggingIntegration({ levels: ["log", "warn", "error"] }), - ], -}); +```bash {tabTitle: npx skills} +npx skills add getsentry/sentry-agent-skills --skill sentry-setup-logging ``` -## Logger Examples - -`Sentry.logger.fmt` is a template literal function that should be used to bring variables into the structured logs. - -```javascript -import * as Sentry from "@sentry/node"; - -Sentry.logger.trace("Starting database connection", { database: "users" }); -Sentry.logger.debug(Sentry.logger.fmt`Cache miss for user: ${userId}`); -Sentry.logger.info("Updated profile", { profileId: 345 }); -Sentry.logger.warn("Rate limit reached for endpoint", { - endpoint: "/api/results/", - isEnterprise: false, -}); -Sentry.logger.error("Failed to process payment", { - orderId: "order_123", - amount: 99.99, -}); -Sentry.logger.fatal("Database connection pool exhausted", { - database: "users", - activeConnections: 100, -}); -``` -```` +See the [full list of available skills](https://skills.sh/getsentry/sentry-agent-skills) and [installation docs](/ai/agent-skills/) for more details. diff --git a/platform-includes/llm-rules-logs/javascript.react.mdx b/platform-includes/llm-rules-logs/javascript.react.mdx index 4338c8c736de7e..d39ae31728de10 100644 --- a/platform-includes/llm-rules-logs/javascript.react.mdx +++ b/platform-includes/llm-rules-logs/javascript.react.mdx @@ -1,64 +1,17 @@ - + -When created as a rules file this should be placed alongside other editor specific rule files. For example, if you are using Cursor, place this file in the `.cursor/rules` directory, or the contents in the `AGENTS.md` or `.cursorrules` (legacy) files. +Install Sentry's [agent skills](/ai/agent-skills/) to teach your AI coding assistant how to set up logging in your React application. -````markdown {filename:rules.mdc} -# Logs +### Install Skills -- Where logs are used, ensure Sentry is imported using `import * as Sentry from "@sentry/react"` -- Enable logging in Sentry using `Sentry.init({ enableLogs: true })` -- Sentry offers a `consoleLoggingIntegration` that can be used to log specific console error types automatically without instrumenting the individual logger calls - -## Configuration - -The Sentry initialization needs to be updated to enable the logs feature. - -### Baseline - -```javascript -Sentry.init({ - dsn: "https://examplePublicKey@o0.ingest.sentry.io/0", - // Enable logs to be sent to Sentry - enableLogs: true, -}); +```bash {tabTitle: dotagents} +npx @sentry/dotagents add getsentry/sentry-agent-skills --name sentry-setup-logging ``` -### Logger Integration - -```javascript -Sentry.init({ - dsn: "https://examplePublicKey@o0.ingest.sentry.io/0", - enableLogs: true, - integrations: [ - // send console.log, console.error, and console.warn calls as logs to Sentry - Sentry.consoleLoggingIntegration({ levels: ["log", "error", "warn"] }), - ], -}); +```bash {tabTitle: npx skills} +npx skills add getsentry/sentry-agent-skills --skill sentry-setup-logging ``` -## Logger Examples - -`Sentry.logger.fmt` is a template literal function that should be used to bring variables into the structured logs. - -```javascript -import * as Sentry from "@sentry/react"; - -Sentry.logger.trace("Starting database connection", { database: "users" }); -Sentry.logger.debug(Sentry.logger.fmt`Cache miss for user: ${userId}`); -Sentry.logger.info("Updated profile", { profileId: 345 }); -Sentry.logger.warn("Rate limit reached for endpoint", { - endpoint: "/api/results/", - isEnterprise: false, -}); -Sentry.logger.error("Failed to process payment", { - orderId: "order_123", - amount: 99.99, -}); -Sentry.logger.fatal("Database connection pool exhausted", { - database: "users", - activeConnections: 100, -}); -``` -```` +See the [full list of available skills](https://skills.sh/getsentry/sentry-agent-skills) and [installation docs](/ai/agent-skills/) for more details. diff --git a/platform-includes/llm-rules-platform/_default.mdx b/platform-includes/llm-rules-platform/_default.mdx index 8384bd0da4937f..448c3b85af9ee4 100644 --- a/platform-includes/llm-rules-platform/_default.mdx +++ b/platform-includes/llm-rules-platform/_default.mdx @@ -1,137 +1,17 @@ - + -Sentry provides a set of rules you can use to help your LLM use Sentry correctly. Copy this file and add it to your projects rules configuration. When created as a rules file this should be placed alongside other editor specific rule files. For example, if you are using Cursor, place this file in the `.cursor/rules` directory, or the contents in the `AGENTS.md` or `.cursorrules` (legacy) files. +Install Sentry's [agent skills](/ai/agent-skills/) to teach your AI coding assistant how to set up and use Sentry correctly. -{/* ATTENTION: The rules defined here must match those in the app's onboarding documentation (see: https://github.com/getsentry/sentry/blob/master/static/app/gettingStartedDocs/javascript/javascript.tsx). -If you make any changes, please update the getting started doc accordingly. */} +### Install Skills -````markdown {filename:rules.mdc} -These examples should be used as guidance when configuring Sentry functionality within a project. - -# Error / Exception Tracking - -- Use `Sentry.captureException(error)` to capture an exception and log the error in Sentry. -- Use this in try catch blocks or areas where exceptions are expected - -# Tracing Examples - -- Spans should be created for meaningful actions within applications like button clicks, API calls, and function calls -- Use the `Sentry.startSpan` function to create a span -- Child spans can exist within a parent span - -## Custom Span instrumentation in component actions - -- Name custom spans with meaningful names and operations. -- Attach attributes based on relevant information and metrics from the request - -```javascript -function TestComponent() { - const handleTestButtonClick = () => { - // Create a transaction/span to measure performance - Sentry.startSpan( - { - op: "ui.click", - name: "Test Button Click", - }, - (span) => { - const value = "some config"; - const metric = "some metric"; - - // Metrics can be added to the span - span.setAttribute("config", value); - span.setAttribute("metric", metric); - - doSomething(); - } - ); - }; - - return ( - - ); -} +```bash {tabTitle: dotagents} +npx @sentry/dotagents add getsentry/sentry-agent-skills --all ``` -## Custom span instrumentation in API calls - -- Name custom spans with meaningful names and operations. -- Attach attributes based on relevant information and metrics from the request - -```javascript -async function fetchUserData(userId) { - return Sentry.startSpan( - { - op: "http.client", - name: `GET /api/users/${userId}`, - }, - async () => { - const response = await fetch(`/api/users/${userId}`); - const data = await response.json(); - return data; - } - ); -} +```bash {tabTitle: npx skills} +npx skills add getsentry/sentry-agent-skills ``` -# Logs - -- Where logs are used, ensure Sentry is imported using `import * as Sentry from "@sentry/browser"` -- Enable logging in Sentry using `Sentry.init({ enableLogs: true })` -- Reference the logger using `Sentry.logger` -- Sentry offers a `consoleLoggingIntegration` that can be used to log specific console error types automatically without instrumenting the individual logger calls - -## Configuration - -### Baseline - -```javascript -import * as Sentry from "@sentry/browser"; - -Sentry.init({ - dsn: "https://examplePublicKey@o0.ingest.sentry.io/0", - - enableLogs: true, -}); -``` - -### Logger Integration - -```javascript -Sentry.init({ - dsn: "https://examplePublicKey@o0.ingest.sentry.io/0", - enableLogs: true, - integrations: [ - // send console.log, console.error, and console.warn calls as logs to Sentry - Sentry.consoleLoggingIntegration({ levels: ["log", "error", "warn"] }), - ], -}); -``` - -## Logger Examples - -`Sentry.logger.fmt` is a template literal function that should be used to bring variables into the structured logs. - -```javascript -import * as Sentry from "@sentry/browser"; - -Sentry.logger.trace("Starting database connection", { database: "users" }); -Sentry.logger.debug(Sentry.logger.fmt`Cache miss for user: ${userId}`); -Sentry.logger.info("Updated profile", { profileId: 345 }); -Sentry.logger.warn("Rate limit reached for endpoint", { - endpoint: "/api/results/", - isEnterprise: false, -}); -Sentry.logger.error("Failed to process payment", { - orderId: "order_123", - amount: 99.99, -}); -Sentry.logger.fatal("Database connection pool exhausted", { - database: "users", - activeConnections: 100, -}); -``` -```` +See the [full list of available skills](https://skills.sh/getsentry/sentry-agent-skills) and [installation docs](/ai/agent-skills/) for more details. diff --git a/platform-includes/llm-rules-platform/javascript.nextjs.mdx b/platform-includes/llm-rules-platform/javascript.nextjs.mdx index 48ea4ff56a1329..d524a62737c17f 100644 --- a/platform-includes/llm-rules-platform/javascript.nextjs.mdx +++ b/platform-includes/llm-rules-platform/javascript.nextjs.mdx @@ -1,138 +1,17 @@ - + -Sentry provides a set of rules you can use to help your LLM use Sentry correctly. Copy this file and add it to your projects rules configuration. When created as a rules file this should be placed alongside other editor specific rule files. For example, if you are using Cursor, place this file in the `.cursor/rules` directory, or the contents in the `AGENTS.md` or `.cursorrules` (legacy) files. +Install Sentry's [agent skills](/ai/agent-skills/) to teach your AI coding assistant how to set up and use Sentry in your Next.js application. -{/* ATTENTION: The rules defined here must match those in the app's onboarding documentation (see: https://github.com/getsentry/sentry/blob/master/static/app/gettingStartedDocs/javascript/nextjs.tsx). -If you make any changes, please update the getting started doc accordingly. */} +### Install Skills -````markdown {filename:rules.mdc} -These examples should be used as guidance when configuring Sentry functionality within a project. - -# Exception Catching - -- Use `Sentry.captureException(error)` to capture an exception and log the error in Sentry. -- Use this in try catch blocks or areas where exceptions are expected - -# Tracing Examples - -- Spans should be created for meaningful actions within applications like button clicks, API calls, and function calls -- Use the `Sentry.startSpan` function to create a span -- Child spans can exist within a parent span - -## Custom Span instrumentation in component actions - -- The `name` and `op` properties should be meaningful for the activities in the call. -- Attach attributes based on relevant information and metrics from the request - -```javascript -function TestComponent() { - const handleTestButtonClick = () => { - // Create a transaction/span to measure performance - Sentry.startSpan( - { - op: "ui.click", - name: "Test Button Click", - }, - (span) => { - const value = "some config"; - const metric = "some metric"; - - // Metrics can be added to the span - span.setAttribute("config", value); - span.setAttribute("metric", metric); - - doSomething(); - } - ); - }; - - return ( - - ); -} +```bash {tabTitle: dotagents} +npx @sentry/dotagents add getsentry/sentry-agent-skills --all ``` -## Custom span instrumentation in API calls - -- The `name` and `op` properties should be meaningful for the activities in the call. -- Attach attributes based on relevant information and metrics from the request - -```javascript -async function fetchUserData(userId) { - return Sentry.startSpan( - { - op: "http.client", - name: `GET /api/users/${userId}`, - }, - async () => { - const response = await fetch(`/api/users/${userId}`); - const data = await response.json(); - return data; - } - ); -} +```bash {tabTitle: npx skills} +npx skills add getsentry/sentry-agent-skills ``` -# Logs - -- Where logs are used, ensure Sentry is imported using `import * as Sentry from "@sentry/nextjs"` -- Enable logging in Sentry using `Sentry.init({ enableLogs: true })` -- Reference the logger using `Sentry.logger` -- Sentry offers a consoleLoggingIntegration that can be used to log specific console error types automatically without instrumenting the individual logger calls - -## Configuration - -- In NextJS the client side Sentry initialization is in `instrumentation-client.ts`, the server initialization is in `sentry.server.config.ts` and the edge initialization is in `sentry.edge.config.ts` -- Initialization does not need to be repeated in other files, it only needs to happen the files mentioned above. You should use `import * as Sentry from "@sentry/nextjs"` to reference Sentry functionality - -### Baseline - -```javascript -import * as Sentry from "@sentry/nextjs"; - -Sentry.init({ - dsn: "https://examplePublicKey@o0.ingest.sentry.io/0", - - enableLogs: true, -}); -``` - -### Logger Integration - -```javascript -Sentry.init({ - dsn: "https://examplePublicKey@o0.ingest.sentry.io/0", - enableLogs: true, - integrations: [ - // send console.log, console.error, and console.warn calls as logs to Sentry - Sentry.consoleLoggingIntegration({ levels: ["log", "error", "warn"] }), - ], -}); -``` - -## Logger Examples - -`logger.fmt` is a template literal function that should be used to bring variables into the structured logs. - -```javascript -logger.trace("Starting database connection", { database: "users" }); -logger.debug(logger.fmt`Cache miss for user: ${userId}`); -logger.info("Updated profile", { profileId: 345 }); -logger.warn("Rate limit reached for endpoint", { - endpoint: "/api/results/", - isEnterprise: false, -}); -logger.error("Failed to process payment", { - orderId: "order_123", - amount: 99.99, -}); -logger.fatal("Database connection pool exhausted", { - database: "users", - activeConnections: 100, -}); -``` -```` +See the [full list of available skills](https://skills.sh/getsentry/sentry-agent-skills) and [installation docs](/ai/agent-skills/) for more details. diff --git a/platform-includes/llm-rules-platform/javascript.node.mdx b/platform-includes/llm-rules-platform/javascript.node.mdx index b9bd63d4f46dcb..87d854e43056c7 100644 --- a/platform-includes/llm-rules-platform/javascript.node.mdx +++ b/platform-includes/llm-rules-platform/javascript.node.mdx @@ -1,132 +1,17 @@ - + -Sentry provides a set of rules you can use to help your LLM use Sentry correctly. Copy this file and add it to your projects rules configuration. When created as a rules file this should be placed alongside other editor specific rule files. For example, if you are using Cursor, place this file in the `.cursor/rules` directory, or the contents in the `AGENTS.md` or `.cursorrules` (legacy) files. +Install Sentry's [agent skills](/ai/agent-skills/) to teach your AI coding assistant how to set up and use Sentry in your Node.js application. -{/* ATTENTION: The rules defined here must match those in the app's onboarding documentation (see: https://github.com/getsentry/sentry/blob/master/static/app/gettingStartedDocs/node/node.tsx). -If you make any changes, please update the getting started doc accordingly. */} +### Install Skills -````markdown {filename:rules.mdc} -These examples should be used as guidance when configuring Sentry functionality within a project. - -# Error / Exception Tracking - -- Use `Sentry.captureException(error)` to capture an exception and log the error in Sentry. -- Use this in try catch blocks or areas where exceptions are expected - -# Tracing Examples - -- Spans should be created for meaningful actions within applications like button clicks, API calls, and function calls -- Ensure you are creating custom spans with meaningful names and operations -- Use the `Sentry.startSpan` function to create a span -- Child spans can exist within a parent span - -## Custom Span instrumentation in component actions - -```javascript -function TestComponent() { - const handleTestButtonClick = () => { - // Create a transaction/span to measure performance - Sentry.startSpan( - { - op: "ui.click", - name: "Test Button Click", - }, - (span) => { - const value = "some config"; - const metric = "some metric"; - - // Metrics can be added to the span - span.setAttribute("config", value); - span.setAttribute("metric", metric); - - doSomething(); - } - ); - }; - - return ( - - ); -} +```bash {tabTitle: dotagents} +npx @sentry/dotagents add getsentry/sentry-agent-skills --all ``` -## Custom span instrumentation in API calls - -```javascript -async function fetchUserData(userId) { - return Sentry.startSpan( - { - op: "http.client", - name: `GET /api/users/${userId}`, - }, - async () => { - const response = await fetch(`/api/users/${userId}`); - const data = await response.json(); - return data; - } - ); -} +```bash {tabTitle: npx skills} +npx skills add getsentry/sentry-agent-skills ``` -# Logs - -- Where logs are used, ensure they are imported using `import * as Sentry from "@sentry/node"` -- Enable logging in Sentry using `Sentry.init({ enableLogs: true, })` -- Reference the logger using `Sentry.logger` -- Sentry offers a consoleLoggingIntegration that can be used to log specific console error types automatically without instrumenting the individual logger calls - -## Configuration - -- In Node.js the Sentry initialization is typically in `instrumentation.ts` - -### Baseline - -```javascript -import * as Sentry from "@sentry/node"; - -Sentry.init({ - dsn: "https://examplePublicKey@o0.ingest.sentry.io/0", - - enableLogs: true, -}); -``` - -### Logger Integration - -```javascript -Sentry.init({ - dsn: "https://examplePublicKey@o0.ingest.sentry.io/0", - enableLogs: true, - integrations: [ - // send console.log, console.error, and console.warn calls as logs to Sentry - Sentry.consoleLoggingIntegration({ levels: ["log", "error", "warn"] }), - ], -}); -``` - -## Logger Examples - -`logger.fmt` is a template literal function that should be used to bring variables into the structured logs. - -```javascript -logger.trace("Starting database connection", { database: "users" }); -logger.debug(logger.fmt`Cache miss for user: ${userId}`); -logger.info("Updated profile", { profileId: 345 }); -logger.warn("Rate limit reached for endpoint", { - endpoint: "/api/results/", - isEnterprise: false, -}); -logger.error("Failed to process payment", { - orderId: "order_123", - amount: 99.99, -}); -logger.fatal("Database connection pool exhausted", { - database: "users", - activeConnections: 100, -}); -``` -```` +See the [full list of available skills](https://skills.sh/getsentry/sentry-agent-skills) and [installation docs](/ai/agent-skills/) for more details. diff --git a/platform-includes/llm-rules-platform/javascript.react.mdx b/platform-includes/llm-rules-platform/javascript.react.mdx index 26b21394e5887d..c465a7ffee3d7a 100644 --- a/platform-includes/llm-rules-platform/javascript.react.mdx +++ b/platform-includes/llm-rules-platform/javascript.react.mdx @@ -1,130 +1,17 @@ - + -Sentry provides a set of rules you can use to help your LLM use Sentry correctly. Copy this file and add it to your projects rules configuration. When created as a rules file this should be placed alongside other editor specific rule files. For example, if you are using Cursor, place this file in the `.cursor/rules` directory, or the contents in the `AGENTS.md` or `.cursorrules` (legacy) files. +Install Sentry's [agent skills](/ai/agent-skills/) to teach your AI coding assistant how to set up and use Sentry in your React application. -{/* ATTENTION: The rules defined here must match those in the app's onboarding documentation (see: https://github.com/getsentry/sentry/blob/master/static/app/gettingStartedDocs/javascript/react.tsx). -If you make any changes, please update the getting started doc accordingly. */} +### Install Skills -````markdown {filename:rules.mdc} -These examples should be used as guidance when configuring Sentry functionality within a project. - -# Error / Exception Tracking - -- Use `Sentry.captureException(error)` to capture an exception and log the error in Sentry. -- Use this in try catch blocks or areas where exceptions are expected - -# Tracing Examples - -- Spans should be created for meaningful actions within applications like button clicks, API calls, and function calls -- Ensure you are creating custom spans with meaningful names and operations -- Use the `Sentry.startSpan` function to create a span -- Child spans can exist within a parent span - -## Custom Span instrumentation in component actions - -```javascript -function TestComponent() { - const handleTestButtonClick = () => { - // Create a transaction/span to measure performance - Sentry.startSpan( - { - op: "ui.click", - name: "Test Button Click", - }, - (span) => { - const value = "some config"; - const metric = "some metric"; - - // Metrics can be added to the span - span.setAttribute("config", value); - span.setAttribute("metric", metric); - - doSomething(); - } - ); - }; - - return ( - - ); -} -``` - -## Custom span instrumentation in API calls - -```javascript -async function fetchUserData(userId) { - return Sentry.startSpan( - { - op: "http.client", - name: `GET /api/users/${userId}`, - }, - async () => { - const response = await fetch(`/api/users/${userId}`); - const data = await response.json(); - return data; - } - ); -} +```bash {tabTitle: dotagents} +npx @sentry/dotagents add getsentry/sentry-agent-skills --all ``` -# Logs - -- Where logs are used, ensure Sentry is imported using `import * as Sentry from "@sentry/react"` -- Enable logging in Sentry using `Sentry.init({ enableLogs: true })` -- Reference the logger using `Sentry.logger` -- Sentry offers a consoleLoggingIntegration that can be used to log specific console error types automatically without instrumenting the individual logger calls - -## Configuration - -### Baseline - -```javascript -import * as Sentry from "@sentry/react"; - -Sentry.init({ - dsn: "https://examplePublicKey@o0.ingest.sentry.io/0", - - enableLogs: true, -}); +```bash {tabTitle: npx skills} +npx skills add getsentry/sentry-agent-skills ``` -### Logger Integration - -```javascript -Sentry.init({ - dsn: "https://examplePublicKey@o0.ingest.sentry.io/0", - enableLogs: true, - integrations: [ - // send console.log, console.error, and console.warn calls as logs to Sentry - Sentry.consoleLoggingIntegration({ levels: ["log", "error", "warn"] }), - ], -}); -``` - -## Logger Examples - -`logger.fmt` is a template literal function that should be used to bring variables into the structured logs. - -```javascript -logger.trace("Starting database connection", { database: "users" }); -logger.debug(logger.fmt`Cache miss for user: ${userId}`); -logger.info("Updated profile", { profileId: 345 }); -logger.warn("Rate limit reached for endpoint", { - endpoint: "/api/results/", - isEnterprise: false, -}); -logger.error("Failed to process payment", { - orderId: "order_123", - amount: 99.99, -}); -logger.fatal("Database connection pool exhausted", { - database: "users", - activeConnections: 100, -}); -``` -```` +See the [full list of available skills](https://skills.sh/getsentry/sentry-agent-skills) and [installation docs](/ai/agent-skills/) for more details. From 27eb31315f9f1309ecc03354cfc2c9cf52d34b25 Mon Sep 17 00:00:00 2001 From: Cody De Arkland Date: Tue, 24 Feb 2026 21:32:25 -0800 Subject: [PATCH 2/4] Add "Copy Install" button to agent skills expandables Extend the Expandable component to support custom copy button labels via string values for the `copy` prop. When a string is provided: - The button displays the custom label instead of "Copy Rules" - Clicking copies only the first (primary) code block - The section expands to show what was copied All agent skills expandables now show a "Copy Install" button that copies the dotagents install command and expands the section. Co-Authored-By: Claude --- docs/platforms/dotnet/common/logs/index.mdx | 2 +- .../platforms/dotnet/common/metrics/index.mdx | 2 +- .../platforms/dotnet/common/tracing/index.mdx | 2 +- .../common/ai-agent-monitoring/index.mdx | 2 +- .../javascript/common/metrics/index.mdx | 2 +- .../javascript/common/tracing/index.mdx | 2 +- .../javascript/guides/nextjs/logs/index.mdx | 2 +- .../guides/nextjs/tracing/index.mdx | 2 +- .../integrations/openai-agents/index.mdx | 2 +- docs/platforms/python/logs/index.mdx | 2 +- docs/platforms/python/metrics/index.mdx | 2 +- docs/platforms/python/tracing/index.mdx | 2 +- .../ai-agents-module.mdx | 2 +- docs/platforms/ruby/common/metrics/index.mdx | 2 +- docs/platforms/ruby/common/tracing/index.mdx | 2 +- docs/platforms/ruby/logs/index.mdx | 2 +- platform-includes/llm-rules-logs/_default.mdx | 2 +- .../llm-rules-logs/javascript.nextjs.mdx | 2 +- .../llm-rules-logs/javascript.node.mdx | 2 +- .../llm-rules-logs/javascript.react.mdx | 2 +- .../llm-rules-platform/_default.mdx | 2 +- .../llm-rules-platform/javascript.nextjs.mdx | 2 +- .../llm-rules-platform/javascript.node.mdx | 2 +- .../llm-rules-platform/javascript.react.mdx | 2 +- src/components/expandable/index.tsx | 25 +++++++++++++------ 25 files changed, 41 insertions(+), 32 deletions(-) diff --git a/docs/platforms/dotnet/common/logs/index.mdx b/docs/platforms/dotnet/common/logs/index.mdx index 4eecfb0c964865..cc80b02f70c774 100644 --- a/docs/platforms/dotnet/common/logs/index.mdx +++ b/docs/platforms/dotnet/common/logs/index.mdx @@ -12,7 +12,7 @@ notSupported: - dotnet.xamarin --- - + Install Sentry's [agent skills](/ai/agent-skills/) to teach your AI coding assistant how to set up logging in your .NET application. diff --git a/docs/platforms/dotnet/common/metrics/index.mdx b/docs/platforms/dotnet/common/metrics/index.mdx index c93ce678db6bd5..8c88ab421c028c 100644 --- a/docs/platforms/dotnet/common/metrics/index.mdx +++ b/docs/platforms/dotnet/common/metrics/index.mdx @@ -7,7 +7,7 @@ sidebar_section: features beta: true --- - + Install Sentry's [agent skills](/ai/agent-skills/) to teach your AI coding assistant how to set up metrics in your .NET application. diff --git a/docs/platforms/dotnet/common/tracing/index.mdx b/docs/platforms/dotnet/common/tracing/index.mdx index 4d09ea21c0501e..835143ca9611d5 100644 --- a/docs/platforms/dotnet/common/tracing/index.mdx +++ b/docs/platforms/dotnet/common/tracing/index.mdx @@ -6,7 +6,7 @@ sidebar_order: 3 sidebar_section: features --- - + Install Sentry’s [agent skills](/ai/agent-skills/) to teach your AI coding assistant how to set up tracing in your .NET application. diff --git a/docs/platforms/javascript/common/ai-agent-monitoring/index.mdx b/docs/platforms/javascript/common/ai-agent-monitoring/index.mdx index ebe3484154f59a..56bb9ce4bd2c2c 100644 --- a/docs/platforms/javascript/common/ai-agent-monitoring/index.mdx +++ b/docs/platforms/javascript/common/ai-agent-monitoring/index.mdx @@ -31,7 +31,7 @@ supported: With Sentry AI Agent Monitoring, you can monitor and debug your AI systems with full-stack context. You'll be able to track key insights like token usage, latency, tool usage, and error rates. AI Agent Monitoring data will be fully connected to your other Sentry data like logs, errors, and traces. - + Install Sentry's [agent skills](/ai/agent-skills/) to teach your AI coding assistant how to set up AI Agent Monitoring in your application. diff --git a/docs/platforms/javascript/common/metrics/index.mdx b/docs/platforms/javascript/common/metrics/index.mdx index 8fc76458277c35..a9a5068dc89206 100644 --- a/docs/platforms/javascript/common/metrics/index.mdx +++ b/docs/platforms/javascript/common/metrics/index.mdx @@ -10,7 +10,7 @@ notSupported: - javascript.capacitor --- - + Install Sentry's [agent skills](/ai/agent-skills/) to teach your AI coding assistant how to set up metrics in your application. diff --git a/docs/platforms/javascript/common/tracing/index.mdx b/docs/platforms/javascript/common/tracing/index.mdx index 7d04016ba49e7e..2f4627c1ba8118 100644 --- a/docs/platforms/javascript/common/tracing/index.mdx +++ b/docs/platforms/javascript/common/tracing/index.mdx @@ -6,7 +6,7 @@ sidebar_order: 6 sidebar_section: features --- - + Install Sentry's [agent skills](/ai/agent-skills/) to teach your AI coding assistant how to set up tracing in your application. diff --git a/docs/platforms/javascript/guides/nextjs/logs/index.mdx b/docs/platforms/javascript/guides/nextjs/logs/index.mdx index d0c051c5877a8e..ad731c5af37a0b 100644 --- a/docs/platforms/javascript/guides/nextjs/logs/index.mdx +++ b/docs/platforms/javascript/guides/nextjs/logs/index.mdx @@ -7,7 +7,7 @@ sidebar_section: features new: true --- - + Install Sentry's [agent skills](/ai/agent-skills/) to teach your AI coding assistant how to set up logging in your Next.js application. diff --git a/docs/platforms/javascript/guides/nextjs/tracing/index.mdx b/docs/platforms/javascript/guides/nextjs/tracing/index.mdx index ff9ae3dd3fe04e..1d16d519a831e5 100644 --- a/docs/platforms/javascript/guides/nextjs/tracing/index.mdx +++ b/docs/platforms/javascript/guides/nextjs/tracing/index.mdx @@ -6,7 +6,7 @@ sidebar_order: 5 sidebar_section: features --- - + Install Sentry's [agent skills](/ai/agent-skills/) to teach your AI coding assistant how to set up tracing in your Next.js application. diff --git a/docs/platforms/python/integrations/openai-agents/index.mdx b/docs/platforms/python/integrations/openai-agents/index.mdx index 1e56b23a20a492..2e51de503130eb 100644 --- a/docs/platforms/python/integrations/openai-agents/index.mdx +++ b/docs/platforms/python/integrations/openai-agents/index.mdx @@ -12,7 +12,7 @@ The support for **OpenAI Agents SDK** is in its beta phase. Please test locally This integration connects Sentry with the [OpenAI Python SDK](https://openai.github.io/openai-agents-python/). The integration has been confirmed to work with OpenAI Agents version 0.0.19. - + Install Sentry's [agent skills](/ai/agent-skills/) to teach your AI coding assistant how to set up AI Agent Monitoring in your Python application. diff --git a/docs/platforms/python/logs/index.mdx b/docs/platforms/python/logs/index.mdx index 0421fba95d7b45..8c68eb1b565236 100644 --- a/docs/platforms/python/logs/index.mdx +++ b/docs/platforms/python/logs/index.mdx @@ -7,7 +7,7 @@ sidebar_section: features new: true --- - + Install Sentry's [agent skills](/ai/agent-skills/) to teach your AI coding assistant how to set up logging in your Python application. diff --git a/docs/platforms/python/metrics/index.mdx b/docs/platforms/python/metrics/index.mdx index d038896bdec0f3..8031bffaa6ab56 100644 --- a/docs/platforms/python/metrics/index.mdx +++ b/docs/platforms/python/metrics/index.mdx @@ -7,7 +7,7 @@ sidebar_section: features beta: true --- - + Install Sentry's [agent skills](/ai/agent-skills/) to teach your AI coding assistant how to set up metrics in your Python application. diff --git a/docs/platforms/python/tracing/index.mdx b/docs/platforms/python/tracing/index.mdx index 92b222860a990e..251db1c5426072 100644 --- a/docs/platforms/python/tracing/index.mdx +++ b/docs/platforms/python/tracing/index.mdx @@ -6,7 +6,7 @@ sidebar_order: 6 sidebar_section: features --- - + Install Sentry's [agent skills](/ai/agent-skills/) to teach your AI coding assistant how to set up tracing in your Python application. diff --git a/docs/platforms/python/tracing/instrumentation/custom-instrumentation/ai-agents-module.mdx b/docs/platforms/python/tracing/instrumentation/custom-instrumentation/ai-agents-module.mdx index 2c62b0883db239..7e83f27bc1c414 100644 --- a/docs/platforms/python/tracing/instrumentation/custom-instrumentation/ai-agents-module.mdx +++ b/docs/platforms/python/tracing/instrumentation/custom-instrumentation/ai-agents-module.mdx @@ -6,7 +6,7 @@ description: "Learn how to manually instrument your code to use Sentry's Agents With Sentry AI Agent Monitoring, you can monitor and debug your AI systems with full-stack context. You'll be able to track key insights like token usage, latency, tool usage, and error rates. AI Agent Monitoring data will be fully connected to your other Sentry data like logs, errors, and traces. - + Install Sentry's [agent skills](/ai/agent-skills/) to teach your AI coding assistant how to set up AI Agent Monitoring in your Python application. diff --git a/docs/platforms/ruby/common/metrics/index.mdx b/docs/platforms/ruby/common/metrics/index.mdx index 7a07cb3e64ea32..7b6547c868558c 100644 --- a/docs/platforms/ruby/common/metrics/index.mdx +++ b/docs/platforms/ruby/common/metrics/index.mdx @@ -7,7 +7,7 @@ sidebar_section: features beta: true --- - + Install Sentry's [agent skills](/ai/agent-skills/) to teach your AI coding assistant how to set up metrics in your Ruby application. diff --git a/docs/platforms/ruby/common/tracing/index.mdx b/docs/platforms/ruby/common/tracing/index.mdx index 651d68450494d3..f356c5eb5d1849 100644 --- a/docs/platforms/ruby/common/tracing/index.mdx +++ b/docs/platforms/ruby/common/tracing/index.mdx @@ -6,7 +6,7 @@ sidebar_order: 6 sidebar_section: features --- - + Install Sentry’s [agent skills](/ai/agent-skills/) to teach your AI coding assistant how to set up tracing in your Ruby application. diff --git a/docs/platforms/ruby/logs/index.mdx b/docs/platforms/ruby/logs/index.mdx index 7ba893c4f5dbc1..5b3d8b950ec066 100644 --- a/docs/platforms/ruby/logs/index.mdx +++ b/docs/platforms/ruby/logs/index.mdx @@ -7,7 +7,7 @@ sidebar_section: features new: true --- - + Install Sentry's [agent skills](/ai/agent-skills/) to teach your AI coding assistant how to set up logging in your Ruby application. diff --git a/platform-includes/llm-rules-logs/_default.mdx b/platform-includes/llm-rules-logs/_default.mdx index f4619670d8c00d..42988d50dfb8e9 100644 --- a/platform-includes/llm-rules-logs/_default.mdx +++ b/platform-includes/llm-rules-logs/_default.mdx @@ -1,4 +1,4 @@ - + Install Sentry's [agent skills](/ai/agent-skills/) to teach your AI coding assistant how to set up logging in your application. diff --git a/platform-includes/llm-rules-logs/javascript.nextjs.mdx b/platform-includes/llm-rules-logs/javascript.nextjs.mdx index 40c5f41204579d..1bc0ed541d7e9d 100644 --- a/platform-includes/llm-rules-logs/javascript.nextjs.mdx +++ b/platform-includes/llm-rules-logs/javascript.nextjs.mdx @@ -1,4 +1,4 @@ - + Install Sentry's [agent skills](/ai/agent-skills/) to teach your AI coding assistant how to set up logging in your Next.js application. diff --git a/platform-includes/llm-rules-logs/javascript.node.mdx b/platform-includes/llm-rules-logs/javascript.node.mdx index bd9d3eb1fefe20..a61b9d78ede2df 100644 --- a/platform-includes/llm-rules-logs/javascript.node.mdx +++ b/platform-includes/llm-rules-logs/javascript.node.mdx @@ -1,4 +1,4 @@ - + Install Sentry's [agent skills](/ai/agent-skills/) to teach your AI coding assistant how to set up logging in your Node.js application. diff --git a/platform-includes/llm-rules-logs/javascript.react.mdx b/platform-includes/llm-rules-logs/javascript.react.mdx index d39ae31728de10..1dc610e5e675a1 100644 --- a/platform-includes/llm-rules-logs/javascript.react.mdx +++ b/platform-includes/llm-rules-logs/javascript.react.mdx @@ -1,4 +1,4 @@ - + Install Sentry's [agent skills](/ai/agent-skills/) to teach your AI coding assistant how to set up logging in your React application. diff --git a/platform-includes/llm-rules-platform/_default.mdx b/platform-includes/llm-rules-platform/_default.mdx index 448c3b85af9ee4..088ee429edfa1d 100644 --- a/platform-includes/llm-rules-platform/_default.mdx +++ b/platform-includes/llm-rules-platform/_default.mdx @@ -1,4 +1,4 @@ - + Install Sentry's [agent skills](/ai/agent-skills/) to teach your AI coding assistant how to set up and use Sentry correctly. diff --git a/platform-includes/llm-rules-platform/javascript.nextjs.mdx b/platform-includes/llm-rules-platform/javascript.nextjs.mdx index d524a62737c17f..e62dd74be5b640 100644 --- a/platform-includes/llm-rules-platform/javascript.nextjs.mdx +++ b/platform-includes/llm-rules-platform/javascript.nextjs.mdx @@ -1,4 +1,4 @@ - + Install Sentry's [agent skills](/ai/agent-skills/) to teach your AI coding assistant how to set up and use Sentry in your Next.js application. diff --git a/platform-includes/llm-rules-platform/javascript.node.mdx b/platform-includes/llm-rules-platform/javascript.node.mdx index 87d854e43056c7..549d309a8f6074 100644 --- a/platform-includes/llm-rules-platform/javascript.node.mdx +++ b/platform-includes/llm-rules-platform/javascript.node.mdx @@ -1,4 +1,4 @@ - + Install Sentry's [agent skills](/ai/agent-skills/) to teach your AI coding assistant how to set up and use Sentry in your Node.js application. diff --git a/platform-includes/llm-rules-platform/javascript.react.mdx b/platform-includes/llm-rules-platform/javascript.react.mdx index c465a7ffee3d7a..491f73d4135a39 100644 --- a/platform-includes/llm-rules-platform/javascript.react.mdx +++ b/platform-includes/llm-rules-platform/javascript.react.mdx @@ -1,4 +1,4 @@ - + Install Sentry's [agent skills](/ai/agent-skills/) to teach your AI coding assistant how to set up and use Sentry in your React application. diff --git a/src/components/expandable/index.tsx b/src/components/expandable/index.tsx index 66364b877aed96..a79c973b7477f0 100644 --- a/src/components/expandable/index.tsx +++ b/src/components/expandable/index.tsx @@ -14,7 +14,8 @@ import styles from './style.module.scss'; type Props = { children: ReactNode; title: string; - copy?: boolean; + /** If true, shows "Copy Rules" button. If a string, uses it as the button label. */ + copy?: boolean | string; /** If defined, the expandable will be grouped with other expandables that have the same group. */ group?: string; // If true, the expandable will not be rendered in the markdown version of the page @@ -77,6 +78,9 @@ export function Expandable({ event.stopPropagation(); // Prevent the details element from toggling event.preventDefault(); // Prevent default summary click behavior + // Expand the section so the user can see what was copied + setIsExpanded(true); + if (contentRef.current === null) { return; } @@ -88,11 +92,16 @@ export function Expandable({ let contentToCopy = ''; if (preCodeBlocks.length > 0) { - // If there are pre code blocks, concatenate their text content - preCodeBlocks.forEach(block => { - contentToCopy += (block.textContent || '') + '\n'; - }); - contentToCopy = contentToCopy.trim(); + if (typeof copy === 'string') { + // When using a custom copy label, copy only the first code block (primary install command) + contentToCopy = (preCodeBlocks[0].textContent || '').trim(); + } else { + // Default behavior: concatenate all code blocks + preCodeBlocks.forEach(block => { + contentToCopy += (block.textContent || '') + '\n'; + }); + contentToCopy = contentToCopy.trim(); + } } else { // Fallback: Look for large standalone code blocks (not inline code) const allCodeBlocks = contentRef.current.querySelectorAll('code'); @@ -131,7 +140,7 @@ export function Expandable({ setCopied(false); } }, - [emit, title] + [copy, emit, title] ); function toggleIsExpanded(event: React.MouseEvent) { @@ -175,7 +184,7 @@ export function Expandable({ onClick={copyContentOnClick} type="button" // Important for buttons in summaries > - {!copied && 'Copy Rules'} + {!copied && (typeof copy === 'string' ? copy : 'Copy Rules')} {copied && 'Copied!'} )} From 99fe52801b4cf42ca77ebd5e40f094406302ef63 Mon Sep 17 00:00:00 2001 From: Cody De Arkland Date: Tue, 24 Feb 2026 21:34:18 -0800 Subject: [PATCH 3/4] Update copy button label to "Copy Install Command" Co-Authored-By: Claude --- docs/platforms/dotnet/common/logs/index.mdx | 2 +- docs/platforms/dotnet/common/metrics/index.mdx | 2 +- docs/platforms/dotnet/common/tracing/index.mdx | 2 +- docs/platforms/javascript/common/ai-agent-monitoring/index.mdx | 2 +- docs/platforms/javascript/common/metrics/index.mdx | 2 +- docs/platforms/javascript/common/tracing/index.mdx | 2 +- docs/platforms/javascript/guides/nextjs/logs/index.mdx | 2 +- docs/platforms/javascript/guides/nextjs/tracing/index.mdx | 2 +- docs/platforms/python/integrations/openai-agents/index.mdx | 2 +- docs/platforms/python/logs/index.mdx | 2 +- docs/platforms/python/metrics/index.mdx | 2 +- docs/platforms/python/tracing/index.mdx | 2 +- .../instrumentation/custom-instrumentation/ai-agents-module.mdx | 2 +- docs/platforms/ruby/common/metrics/index.mdx | 2 +- docs/platforms/ruby/common/tracing/index.mdx | 2 +- docs/platforms/ruby/logs/index.mdx | 2 +- platform-includes/llm-rules-logs/_default.mdx | 2 +- platform-includes/llm-rules-logs/javascript.nextjs.mdx | 2 +- platform-includes/llm-rules-logs/javascript.node.mdx | 2 +- platform-includes/llm-rules-logs/javascript.react.mdx | 2 +- platform-includes/llm-rules-platform/_default.mdx | 2 +- platform-includes/llm-rules-platform/javascript.nextjs.mdx | 2 +- platform-includes/llm-rules-platform/javascript.node.mdx | 2 +- platform-includes/llm-rules-platform/javascript.react.mdx | 2 +- 24 files changed, 24 insertions(+), 24 deletions(-) diff --git a/docs/platforms/dotnet/common/logs/index.mdx b/docs/platforms/dotnet/common/logs/index.mdx index cc80b02f70c774..13fac1464347b7 100644 --- a/docs/platforms/dotnet/common/logs/index.mdx +++ b/docs/platforms/dotnet/common/logs/index.mdx @@ -12,7 +12,7 @@ notSupported: - dotnet.xamarin --- - + Install Sentry's [agent skills](/ai/agent-skills/) to teach your AI coding assistant how to set up logging in your .NET application. diff --git a/docs/platforms/dotnet/common/metrics/index.mdx b/docs/platforms/dotnet/common/metrics/index.mdx index 8c88ab421c028c..716378fcfb4e23 100644 --- a/docs/platforms/dotnet/common/metrics/index.mdx +++ b/docs/platforms/dotnet/common/metrics/index.mdx @@ -7,7 +7,7 @@ sidebar_section: features beta: true --- - + Install Sentry's [agent skills](/ai/agent-skills/) to teach your AI coding assistant how to set up metrics in your .NET application. diff --git a/docs/platforms/dotnet/common/tracing/index.mdx b/docs/platforms/dotnet/common/tracing/index.mdx index 835143ca9611d5..43217120322ccd 100644 --- a/docs/platforms/dotnet/common/tracing/index.mdx +++ b/docs/platforms/dotnet/common/tracing/index.mdx @@ -6,7 +6,7 @@ sidebar_order: 3 sidebar_section: features --- - + Install Sentry’s [agent skills](/ai/agent-skills/) to teach your AI coding assistant how to set up tracing in your .NET application. diff --git a/docs/platforms/javascript/common/ai-agent-monitoring/index.mdx b/docs/platforms/javascript/common/ai-agent-monitoring/index.mdx index 56bb9ce4bd2c2c..e93e191774901e 100644 --- a/docs/platforms/javascript/common/ai-agent-monitoring/index.mdx +++ b/docs/platforms/javascript/common/ai-agent-monitoring/index.mdx @@ -31,7 +31,7 @@ supported: With Sentry AI Agent Monitoring, you can monitor and debug your AI systems with full-stack context. You'll be able to track key insights like token usage, latency, tool usage, and error rates. AI Agent Monitoring data will be fully connected to your other Sentry data like logs, errors, and traces. - + Install Sentry's [agent skills](/ai/agent-skills/) to teach your AI coding assistant how to set up AI Agent Monitoring in your application. diff --git a/docs/platforms/javascript/common/metrics/index.mdx b/docs/platforms/javascript/common/metrics/index.mdx index a9a5068dc89206..a8e8e878055a72 100644 --- a/docs/platforms/javascript/common/metrics/index.mdx +++ b/docs/platforms/javascript/common/metrics/index.mdx @@ -10,7 +10,7 @@ notSupported: - javascript.capacitor --- - + Install Sentry's [agent skills](/ai/agent-skills/) to teach your AI coding assistant how to set up metrics in your application. diff --git a/docs/platforms/javascript/common/tracing/index.mdx b/docs/platforms/javascript/common/tracing/index.mdx index 2f4627c1ba8118..90ef301918f01e 100644 --- a/docs/platforms/javascript/common/tracing/index.mdx +++ b/docs/platforms/javascript/common/tracing/index.mdx @@ -6,7 +6,7 @@ sidebar_order: 6 sidebar_section: features --- - + Install Sentry's [agent skills](/ai/agent-skills/) to teach your AI coding assistant how to set up tracing in your application. diff --git a/docs/platforms/javascript/guides/nextjs/logs/index.mdx b/docs/platforms/javascript/guides/nextjs/logs/index.mdx index ad731c5af37a0b..bae6030edd6f7c 100644 --- a/docs/platforms/javascript/guides/nextjs/logs/index.mdx +++ b/docs/platforms/javascript/guides/nextjs/logs/index.mdx @@ -7,7 +7,7 @@ sidebar_section: features new: true --- - + Install Sentry's [agent skills](/ai/agent-skills/) to teach your AI coding assistant how to set up logging in your Next.js application. diff --git a/docs/platforms/javascript/guides/nextjs/tracing/index.mdx b/docs/platforms/javascript/guides/nextjs/tracing/index.mdx index 1d16d519a831e5..9adf273142d22c 100644 --- a/docs/platforms/javascript/guides/nextjs/tracing/index.mdx +++ b/docs/platforms/javascript/guides/nextjs/tracing/index.mdx @@ -6,7 +6,7 @@ sidebar_order: 5 sidebar_section: features --- - + Install Sentry's [agent skills](/ai/agent-skills/) to teach your AI coding assistant how to set up tracing in your Next.js application. diff --git a/docs/platforms/python/integrations/openai-agents/index.mdx b/docs/platforms/python/integrations/openai-agents/index.mdx index 2e51de503130eb..ef517f1783a228 100644 --- a/docs/platforms/python/integrations/openai-agents/index.mdx +++ b/docs/platforms/python/integrations/openai-agents/index.mdx @@ -12,7 +12,7 @@ The support for **OpenAI Agents SDK** is in its beta phase. Please test locally This integration connects Sentry with the [OpenAI Python SDK](https://openai.github.io/openai-agents-python/). The integration has been confirmed to work with OpenAI Agents version 0.0.19. - + Install Sentry's [agent skills](/ai/agent-skills/) to teach your AI coding assistant how to set up AI Agent Monitoring in your Python application. diff --git a/docs/platforms/python/logs/index.mdx b/docs/platforms/python/logs/index.mdx index 8c68eb1b565236..0a93e2c07580f9 100644 --- a/docs/platforms/python/logs/index.mdx +++ b/docs/platforms/python/logs/index.mdx @@ -7,7 +7,7 @@ sidebar_section: features new: true --- - + Install Sentry's [agent skills](/ai/agent-skills/) to teach your AI coding assistant how to set up logging in your Python application. diff --git a/docs/platforms/python/metrics/index.mdx b/docs/platforms/python/metrics/index.mdx index 8031bffaa6ab56..16913ab5c47b69 100644 --- a/docs/platforms/python/metrics/index.mdx +++ b/docs/platforms/python/metrics/index.mdx @@ -7,7 +7,7 @@ sidebar_section: features beta: true --- - + Install Sentry's [agent skills](/ai/agent-skills/) to teach your AI coding assistant how to set up metrics in your Python application. diff --git a/docs/platforms/python/tracing/index.mdx b/docs/platforms/python/tracing/index.mdx index 251db1c5426072..3a70eeba71395c 100644 --- a/docs/platforms/python/tracing/index.mdx +++ b/docs/platforms/python/tracing/index.mdx @@ -6,7 +6,7 @@ sidebar_order: 6 sidebar_section: features --- - + Install Sentry's [agent skills](/ai/agent-skills/) to teach your AI coding assistant how to set up tracing in your Python application. diff --git a/docs/platforms/python/tracing/instrumentation/custom-instrumentation/ai-agents-module.mdx b/docs/platforms/python/tracing/instrumentation/custom-instrumentation/ai-agents-module.mdx index 7e83f27bc1c414..9a1c9f8fc6a759 100644 --- a/docs/platforms/python/tracing/instrumentation/custom-instrumentation/ai-agents-module.mdx +++ b/docs/platforms/python/tracing/instrumentation/custom-instrumentation/ai-agents-module.mdx @@ -6,7 +6,7 @@ description: "Learn how to manually instrument your code to use Sentry's Agents With Sentry AI Agent Monitoring, you can monitor and debug your AI systems with full-stack context. You'll be able to track key insights like token usage, latency, tool usage, and error rates. AI Agent Monitoring data will be fully connected to your other Sentry data like logs, errors, and traces. - + Install Sentry's [agent skills](/ai/agent-skills/) to teach your AI coding assistant how to set up AI Agent Monitoring in your Python application. diff --git a/docs/platforms/ruby/common/metrics/index.mdx b/docs/platforms/ruby/common/metrics/index.mdx index 7b6547c868558c..ece5b06dbeb829 100644 --- a/docs/platforms/ruby/common/metrics/index.mdx +++ b/docs/platforms/ruby/common/metrics/index.mdx @@ -7,7 +7,7 @@ sidebar_section: features beta: true --- - + Install Sentry's [agent skills](/ai/agent-skills/) to teach your AI coding assistant how to set up metrics in your Ruby application. diff --git a/docs/platforms/ruby/common/tracing/index.mdx b/docs/platforms/ruby/common/tracing/index.mdx index f356c5eb5d1849..295f0280b36971 100644 --- a/docs/platforms/ruby/common/tracing/index.mdx +++ b/docs/platforms/ruby/common/tracing/index.mdx @@ -6,7 +6,7 @@ sidebar_order: 6 sidebar_section: features --- - + Install Sentry’s [agent skills](/ai/agent-skills/) to teach your AI coding assistant how to set up tracing in your Ruby application. diff --git a/docs/platforms/ruby/logs/index.mdx b/docs/platforms/ruby/logs/index.mdx index 5b3d8b950ec066..200d686d44022a 100644 --- a/docs/platforms/ruby/logs/index.mdx +++ b/docs/platforms/ruby/logs/index.mdx @@ -7,7 +7,7 @@ sidebar_section: features new: true --- - + Install Sentry's [agent skills](/ai/agent-skills/) to teach your AI coding assistant how to set up logging in your Ruby application. diff --git a/platform-includes/llm-rules-logs/_default.mdx b/platform-includes/llm-rules-logs/_default.mdx index 42988d50dfb8e9..4b7360faa788ca 100644 --- a/platform-includes/llm-rules-logs/_default.mdx +++ b/platform-includes/llm-rules-logs/_default.mdx @@ -1,4 +1,4 @@ - + Install Sentry's [agent skills](/ai/agent-skills/) to teach your AI coding assistant how to set up logging in your application. diff --git a/platform-includes/llm-rules-logs/javascript.nextjs.mdx b/platform-includes/llm-rules-logs/javascript.nextjs.mdx index 1bc0ed541d7e9d..df3c71c1f16d6c 100644 --- a/platform-includes/llm-rules-logs/javascript.nextjs.mdx +++ b/platform-includes/llm-rules-logs/javascript.nextjs.mdx @@ -1,4 +1,4 @@ - + Install Sentry's [agent skills](/ai/agent-skills/) to teach your AI coding assistant how to set up logging in your Next.js application. diff --git a/platform-includes/llm-rules-logs/javascript.node.mdx b/platform-includes/llm-rules-logs/javascript.node.mdx index a61b9d78ede2df..1e9b6a3c9f59dc 100644 --- a/platform-includes/llm-rules-logs/javascript.node.mdx +++ b/platform-includes/llm-rules-logs/javascript.node.mdx @@ -1,4 +1,4 @@ - + Install Sentry's [agent skills](/ai/agent-skills/) to teach your AI coding assistant how to set up logging in your Node.js application. diff --git a/platform-includes/llm-rules-logs/javascript.react.mdx b/platform-includes/llm-rules-logs/javascript.react.mdx index 1dc610e5e675a1..1c8f85eb50380a 100644 --- a/platform-includes/llm-rules-logs/javascript.react.mdx +++ b/platform-includes/llm-rules-logs/javascript.react.mdx @@ -1,4 +1,4 @@ - + Install Sentry's [agent skills](/ai/agent-skills/) to teach your AI coding assistant how to set up logging in your React application. diff --git a/platform-includes/llm-rules-platform/_default.mdx b/platform-includes/llm-rules-platform/_default.mdx index 088ee429edfa1d..544a29fa10cbbc 100644 --- a/platform-includes/llm-rules-platform/_default.mdx +++ b/platform-includes/llm-rules-platform/_default.mdx @@ -1,4 +1,4 @@ - + Install Sentry's [agent skills](/ai/agent-skills/) to teach your AI coding assistant how to set up and use Sentry correctly. diff --git a/platform-includes/llm-rules-platform/javascript.nextjs.mdx b/platform-includes/llm-rules-platform/javascript.nextjs.mdx index e62dd74be5b640..d3204dad810033 100644 --- a/platform-includes/llm-rules-platform/javascript.nextjs.mdx +++ b/platform-includes/llm-rules-platform/javascript.nextjs.mdx @@ -1,4 +1,4 @@ - + Install Sentry's [agent skills](/ai/agent-skills/) to teach your AI coding assistant how to set up and use Sentry in your Next.js application. diff --git a/platform-includes/llm-rules-platform/javascript.node.mdx b/platform-includes/llm-rules-platform/javascript.node.mdx index 549d309a8f6074..3c1f03e4839215 100644 --- a/platform-includes/llm-rules-platform/javascript.node.mdx +++ b/platform-includes/llm-rules-platform/javascript.node.mdx @@ -1,4 +1,4 @@ - + Install Sentry's [agent skills](/ai/agent-skills/) to teach your AI coding assistant how to set up and use Sentry in your Node.js application. diff --git a/platform-includes/llm-rules-platform/javascript.react.mdx b/platform-includes/llm-rules-platform/javascript.react.mdx index 491f73d4135a39..7bbfca9685d986 100644 --- a/platform-includes/llm-rules-platform/javascript.react.mdx +++ b/platform-includes/llm-rules-platform/javascript.react.mdx @@ -1,4 +1,4 @@ - + Install Sentry's [agent skills](/ai/agent-skills/) to teach your AI coding assistant how to set up and use Sentry in your React application. From 50518a307cc7a42f6d84730d19651852b21d26fc Mon Sep 17 00:00:00 2001 From: Cody De Arkland Date: Tue, 24 Feb 2026 21:38:03 -0800 Subject: [PATCH 4/4] Use specific sentry-setup-ai-monitoring skill on AI monitoring pages Reference the specific skill instead of --all so users install only the AI monitoring skill from the relevant documentation pages. Co-Authored-By: Claude --- .../platforms/javascript/common/ai-agent-monitoring/index.mdx | 4 ++-- docs/platforms/python/integrations/openai-agents/index.mdx | 4 ++-- .../custom-instrumentation/ai-agents-module.mdx | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/platforms/javascript/common/ai-agent-monitoring/index.mdx b/docs/platforms/javascript/common/ai-agent-monitoring/index.mdx index e93e191774901e..cf5b7c39121424 100644 --- a/docs/platforms/javascript/common/ai-agent-monitoring/index.mdx +++ b/docs/platforms/javascript/common/ai-agent-monitoring/index.mdx @@ -38,11 +38,11 @@ Install Sentry's [agent skills](/ai/agent-skills/) to teach your AI coding assis ### Install Skills ```bash {tabTitle: dotagents} -npx @sentry/dotagents add getsentry/sentry-agent-skills --all +npx @sentry/dotagents add getsentry/sentry-agent-skills --name sentry-setup-ai-monitoring ``` ```bash {tabTitle: npx skills} -npx skills add getsentry/sentry-agent-skills +npx skills add getsentry/sentry-agent-skills --skill sentry-setup-ai-monitoring ``` See the [full list of available skills](https://skills.sh/getsentry/sentry-agent-skills) and [installation docs](/ai/agent-skills/) for more details. diff --git a/docs/platforms/python/integrations/openai-agents/index.mdx b/docs/platforms/python/integrations/openai-agents/index.mdx index ef517f1783a228..c30e347bc4f95c 100644 --- a/docs/platforms/python/integrations/openai-agents/index.mdx +++ b/docs/platforms/python/integrations/openai-agents/index.mdx @@ -19,11 +19,11 @@ Install Sentry's [agent skills](/ai/agent-skills/) to teach your AI coding assis ### Install Skills ```bash {tabTitle: dotagents} -npx @sentry/dotagents add getsentry/sentry-agent-skills --all +npx @sentry/dotagents add getsentry/sentry-agent-skills --name sentry-setup-ai-monitoring ``` ```bash {tabTitle: npx skills} -npx skills add getsentry/sentry-agent-skills +npx skills add getsentry/sentry-agent-skills --skill sentry-setup-ai-monitoring ``` See the [full list of available skills](https://skills.sh/getsentry/sentry-agent-skills) and [installation docs](/ai/agent-skills/) for more details. diff --git a/docs/platforms/python/tracing/instrumentation/custom-instrumentation/ai-agents-module.mdx b/docs/platforms/python/tracing/instrumentation/custom-instrumentation/ai-agents-module.mdx index 9a1c9f8fc6a759..75290a13c82b80 100644 --- a/docs/platforms/python/tracing/instrumentation/custom-instrumentation/ai-agents-module.mdx +++ b/docs/platforms/python/tracing/instrumentation/custom-instrumentation/ai-agents-module.mdx @@ -13,11 +13,11 @@ Install Sentry's [agent skills](/ai/agent-skills/) to teach your AI coding assis ### Install Skills ```bash {tabTitle: dotagents} -npx @sentry/dotagents add getsentry/sentry-agent-skills --all +npx @sentry/dotagents add getsentry/sentry-agent-skills --name sentry-setup-ai-monitoring ``` ```bash {tabTitle: npx skills} -npx skills add getsentry/sentry-agent-skills +npx skills add getsentry/sentry-agent-skills --skill sentry-setup-ai-monitoring ``` See the [full list of available skills](https://skills.sh/getsentry/sentry-agent-skills) and [installation docs](/ai/agent-skills/) for more details.