Skip to content

Conversation

@devin-ai-integration
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot commented Nov 25, 2025

Short description of the changes made

Updates the api_playground_request_received PostHog 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 path
  • endpointId - the endpoint ID
  • endpointName - the endpoint name
  • endpointRoute - the endpoint route path (e.g., /users/:id)
  • method - the HTTP method
  • responseCode - the HTTP response status code
  • responseMessage - 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?

  • Lint checks pass (pnpm lint:biome)
  • Format checks pass (pnpm format)
  • Local dev server compiles successfully

Updates since last revision

  • Added defensive check (?? "") for when JSON.stringify() returns undefined, addressing Vercel Agent feedback

Human Review Checklist

  • Breaking change: The existing api_playground_request_received event structure changed - the nested response object (with status, statusText, time, size) was replaced with flat fields (responseCode, responseMessage). Verify this is acceptable for existing PostHog dashboards.
  • Verify the tracked fields match what's expected in PostHog
  • Audio file responses use a placeholder message "[audio file response]" instead of actual content - confirm this is appropriate

Link to Devin run: https://app.devin.ai/sessions/9363494060664bb9b7a00175fb4a850d
Requested by: Catherine Deskur (catherine@buildwithfern.com)

Co-Authored-By: Catherine Deskur <catherine@buildwithfern.com>
@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@vercel
Copy link
Contributor

vercel bot commented Nov 25, 2025

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

Project Deployment Preview Updated (UTC)
dev.ferndocs.com Ready Ready Preview Nov 25, 2025 7:54pm
fern-dashboard Ready Ready Preview Nov 25, 2025 7:54pm
fern-dashboard-dev Ready Ready Preview Nov 25, 2025 7:54pm
prod-assets.ferndocs.com Ready Ready Preview Nov 25, 2025 7:54pm
prod.ferndocs.com Ready Ready Preview Nov 25, 2025 7:54pm
1 Skipped Deployment
Project Deployment Preview Updated (UTC)
fern-platform Ignored Ignored Nov 25, 2025 7:54pm

@github-actions
Copy link
Contributor

github-actions bot commented Nov 25, 2025

🌱 Smoke Test Preview

Testing branch changes with smoke test content:

🕷️ Smoke Test Crawler Results

Pages crawled: 33
Successful: 33 ✅
With errors: 0

🎉 All pages loaded successfully with no errors!

Co-Authored-By: Catherine Deskur <catherine@buildwithfern.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants