Skip to content

add back in docs query endpoint trackling lost with fuma docs#2748

Open
annabellscha wants to merge 2 commits intomainfrom
add-docs-query-endpoint-tracking
Open

add back in docs query endpoint trackling lost with fuma docs#2748
annabellscha wants to merge 2 commits intomainfrom
add-docs-query-endpoint-tracking

Conversation

@annabellscha
Copy link
Copy Markdown
Contributor

  • Was removed after migration to fuma docs, adding back in

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 30, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
langfuse-docs Ready Ready Preview, Comment Mar 30, 2026 1:13pm

Request Review

@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Mar 30, 2026
@github-actions
Copy link
Copy Markdown

@claude review

@dosubot dosubot bot added the documentation Improvements or additions to documentation label Mar 30, 2026
Copy link
Copy Markdown

@claude claude bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM — straightforward restoration of PostHog tracking with proper error handling and non-blocking .

Extended reasoning...

Overview

Single file change to that restores PostHog analytics tracking that was lost during a migration to fuma docs. Adds PostHog client initialization and a -wrapped tracking call in the GET handler.

Security risks

None significant. The PostHog key is read from an environment variable and the client is only instantiated when the key is present. The tracked data is the user's search query, which is already being processed by the endpoint. CORS headers are unchanged. No auth or permission logic is touched.

Level of scrutiny

Low. This is a docs site analytics endpoint — not production-critical business logic. The pattern (conditional PostHog init + + try/catch) is standard and well-understood.

Other factors

No bugs found. Deployment already showing Ready on Vercel preview. Change is small, self-contained, and follows established patterns in the codebase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant