This commit is contained in:
Edwin Lim
2025-09-16 15:00:34 -04:00
committed by GitHub
parent 169e6665fa
commit d45e7791d9
4 changed files with 14 additions and 4 deletions

View File

@@ -169,7 +169,7 @@ The process is slightly different depending on the SDK you're using.
<Tab.Panels>
<Tab.Panel>
In [JavaScript Web](/docs/libraries/javascript) and [Node.js](/docs/libraries/node) SDKs, you can override the default properties by passing a `before_send` callback. This callback is called before any exception is captured.
In [JavaScript Web](/docs/libraries/js) and [Node.js](/docs/libraries/node) SDKs, you can override the default properties by passing a `before_send` callback. This callback is called before any exception is captured.
```javascript
posthog.init('<ph_project_api_key>', {

View File

@@ -2,7 +2,7 @@
title: Debugging with MCP
---
The [PostHog MCP server](/docs/model-context-protocol) exposes [function calling tools](/docs/agent-toolkit) to any MCP client, enabling AI agents to interact with PostHog's API via the MCP protocol.
The [PostHog MCP server](/docs/model-context-protocol) exposes [function calling tools](/docs/ai-engineering/agent-toolkit) to any MCP client, enabling AI agents to interact with PostHog's API via the MCP protocol.
When combining our MCP server with error tracking, your AI agents can take actions based on PostHog data which unlocks powerful, autonomous debugging capabilities.
@@ -18,7 +18,7 @@ All of this happens directly inside the MCP client, like Cursor, Windsurf, or Cl
## See it in action
<ProductVideo
videoLight= "https://res.cloudinary.com/dmukukwp6/video/upload/mcp_error_tracking_debugging_e02a96485c.mp4"
videoLight= "https://res.cloudinary.com/dmukukwp6/video/upload/mcp_error_tracking_debugging30_6e25828d88.mp4"
alt="Use PostHog MCP to debug errors"
classes="rounded"
autoPlay={false}

View File

@@ -102,7 +102,7 @@ Let AI investigate and debug errors for you.
Connect with the PostHog MCP server to enable autonomous debugging with AI agents. You can also copy our [premade AI prompts](/docs/error-tracking/fix-with-ai-prompts) which include full stack traces and curated instructions for the AI to follow.
<ProductVideo
videoLight= "https://res.cloudinary.com/dmukukwp6/video/upload/mcp_error_tracking_debugging_e02a96485c.mp4"
videoLight= "https://res.cloudinary.com/dmukukwp6/video/upload/mcp_error_tracking_debugging30_6e25828d88.mp4"
alt="Use PostHog MCP to debug errors"
classes="rounded"
autoPlay={false}

View File

@@ -48,6 +48,10 @@ const CONFIG = {
],
SITEMAP_PATH: path.join(process.cwd(), 'public', 'sitemap', 'sitemap-0.xml'),
CONTENTS_DIR: 'contents',
// Special case URLs that should be considered valid even if not in sitemap
SPECIAL_CASE_URLS: [
'/startups', // Dynamic route in sitemap as /startups/[...slug]
],
}
// Global cache for anchor links
@@ -280,6 +284,12 @@ function extractAnchorsFromHtml(htmlPath) {
// Check if internal URL exists in sitemap
function validateInternalUrl(url, pages) {
const [baseUrl] = url.split('#')
// Check special case URLs that should be considered valid
if (CONFIG.SPECIAL_CASE_URLS.includes(baseUrl)) {
return true
}
return urlExistsInSitemap(baseUrl, pages)
}