-
Notifications
You must be signed in to change notification settings - Fork 26
feat(docs): add PostHog tracking for API explorer responses #5489
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: app
Are you sure you want to change the base?
feat(docs): add PostHog tracking for API explorer responses #5489
Conversation
Co-Authored-By: Catherine Deskur <catherine@buildwithfern.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
🌱 Smoke Test PreviewTesting branch changes with smoke test content:
🕷️ Smoke Test Crawler ResultsPages crawled: 33 🎉 All pages loaded successfully with no errors! |
packages/fern-docs/bundle/src/components/playground/endpoint/PlaygroundEndpoint.tsx
Outdated
Show resolved
Hide resolved
Co-Authored-By: Catherine Deskur <catherine@buildwithfern.com>
Short description of the changes made
Updates the
api_playground_request_receivedPostHog tracking event to include additional fields and extends tracking to cover all response types (REST, stream, and audio file responses).New tracked fields:
docsRoute- the docs route pathendpointId- the endpoint IDendpointName- the endpoint nameendpointRoute- the endpoint route path (e.g.,/users/:id)method- the HTTP methodresponseCode- the HTTP response status coderesponseMessage- the response body (truncated to 100 characters)What was the motivation & context behind this PR?
Requested by Catherine Deskur to improve analytics tracking for API explorer usage.
How has this PR been tested?
pnpm lint:biome)pnpm format)Updates since last revision
?? "") for whenJSON.stringify()returnsundefined, addressing Vercel Agent feedbackHuman Review Checklist
api_playground_request_receivedevent structure changed - the nestedresponseobject (withstatus,statusText,time,size) was replaced with flat fields (responseCode,responseMessage). Verify this is acceptable for existing PostHog dashboards."[audio file response]"instead of actual content - confirm this is appropriateLink to Devin run: https://app.devin.ai/sessions/9363494060664bb9b7a00175fb4a850d
Requested by: Catherine Deskur (catherine@buildwithfern.com)