Skip to content

Conversation

@dannysheridan
Copy link
Member

Description

Refs: Slack thread about missing PostHog event properties for fern generate --docs

Enhances PostHog CLI event instrumentation to capture more useful data for support and proactive outreach. Also fixes a bug where event properties were being nested incorrectly in the PostHog payload.

Link to Devin run: https://app.devin.ai/sessions/08e71a3193514b8994bf73c7576e16be
Requested by: danny@buildwithfern.com (@dannysheridan)

Changes Made

  • Fixed nested properties bug in PostHog managers: Previously, ...event was spread into properties, which included the properties field itself, then ...event.properties was also spread, causing duplicate/nested data. Now explicitly extracts orgId and command instead.

  • Added properties to fern generate --docs: preview, instance, instancesCount, apiWorkspacesCount, brokenLinks, strictBrokenLinks, disableTemplates, skipUpload, isCI

  • Added properties to fern docs dev: port, backendPort, brokenLinks, bundlePathProvided, forceDownload, apiWorkspacesCount

  • Added properties to fern test: hasTestCommand, generationLanguage, apiWorkspacesCount

  • Added properties to fern mock: portProvided, apiWorkspacesCount

  • Added properties to other commands: fern api update (apiProvided), fern self-update (versionProvided, dryRun), fern login (deviceCode), fern format (ci, apiProvided)

  • Updated README.md generator (if applicable) - N/A

Testing

  • Unit tests added/updated
  • Manual testing completed - Lint checks pass

Human Review Checklist

  • Verify the PostHog manager fix (...event → explicit orgId/command) won't break existing analytics dashboards
  • Confirm no sensitive data is being sent in the new properties (instance URLs are intentionally included for support purposes)
  • Check property naming consistency across commands
…roperties

Co-Authored-By: danny@buildwithfern.com <danny@buildwithfern.com>
@devin-ai-integration
Copy link
Contributor

🤖 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
@github-actions
Copy link
Contributor

🌱 Seed Test Selector

Select languages to run seed tests for:

  • Python
  • TypeScript
  • Java
  • Go
  • Ruby
  • C#
  • PHP
  • Swift
  • Rust
  • OpenAPI
  • Postman

How to use: Click the ⋯ menu above → "Edit" → check the boxes you want → click "Update comment". Tests will run automatically and snapshots will be committed to this PR.

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

Labels

None yet

2 participants