close
Skip to content

feat: add Appsero telemetry tracking to WPGraphQL IDE#3765

Merged
jasonbahl merged 7 commits into
mainfrom
feat/ide-appsero-tracking
Apr 13, 2026
Merged

feat: add Appsero telemetry tracking to WPGraphQL IDE#3765
jasonbahl merged 7 commits into
mainfrom
feat/ide-appsero-tracking

Conversation

@jasonbahl
Copy link
Copy Markdown
Collaborator

Summary

  • Adds Appsero SDK (appsero/client v2.0.6) as a Composer dependency to the WPGraphQL IDE plugin for opt-in telemetry tracking
  • Adds init_appsero_telemetry() initialization in wpgraphql-ide.php, following the same defensive patterns as the core WPGraphQL plugin (class_exists guard, PHPSTAN guard, try/catch, error logging)
  • Loads Composer autoloader in the main plugin file
  • Removes /vendor from .distignore so the Appsero dependency ships in plugin releases
  • Adds Privacy Policy sections to both readme.txt (with FAQ entry) and README.md to comply with WordPress.org guidelines

Details

The Appsero project ID for WPGraphQL IDE is e90103d6-2c09-4152-96e0-eb7d0d3b5c74.

No data is collected without explicit user consent via an admin notice. The integration mirrors the approach already used in the core wp-graphql plugin.

Files changed

File Change
composer.json Added appsero/client: 2.0.6 to require
wpgraphql-ide.php Added autoloader require + init_appsero_telemetry()
.distignore Removed /vendor exclusion
readme.txt Added FAQ + Privacy Policy section
README.md Added Privacy Policy section

CI / Deploy

No workflow changes needed. The existing integration-tests-reusable.yml already runs composer install per-plugin, and release-please.yml runs composer install --no-dev before building the deployment artifact. Vendor exclusions in .eslintignore, phpcs.xml.dist, and phpstan.neon.dist are already in place.

Test plan

  • Verify composer install succeeds in plugins/wp-graphql-ide/
  • Verify the plugin activates without errors in wp-env
  • Verify Appsero admin consent notice appears for new installs
  • Verify no telemetry is sent without user opt-in
  • Verify CI integration tests pass

Add opt-in telemetry via Appsero SDK to help troubleshoot issues and
improve the plugin. No data is collected without explicit user consent.

- Add appsero/client 2.0.6 as a Composer dependency
- Add init_appsero_telemetry() with defensive error handling (matching
  the pattern used in the core WPGraphQL plugin)
- Load Composer autoloader in the main plugin file
- Remove /vendor from .distignore so the dependency ships in releases
- Add Privacy Policy sections to readme.txt and README.md
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 13, 2026

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

Project Deployment Actions Updated (UTC)
wpgraphql-com Ready Ready Preview, Comment Apr 13, 2026 8:24pm

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.3%. Comparing base (b10ce1a) to head (c432bb4).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##              main   #3765   +/-   ##
=======================================
  Coverage     83.3%   83.3%           
  Complexity    5193    5193           
=======================================
  Files          286     286           
  Lines        22555   22555           
=======================================
  Hits         18799   18799           
  Misses        3756    3756           
Flag Coverage Δ
wp-graphql-acf-wpunit-twentytwentyfive-single 77.1% <ø> (ø)
wp-graphql-wpunit-twentytwentyfive-multisite 84.4% <ø> (ø)
wp-graphql-wpunit-twentytwentyfive-single 84.4% <ø> (ø)
wp-graphql-wpunit-twentytwentyone-multisite 84.4% <ø> (ø)
wp-graphql-wpunit-twentytwentyone-single 84.4% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Add wp-env:cli, lint:php, lint:php:fix, and lint:php:stan scripts
matching the pattern used in wp-graphql and wp-graphql-acf for
consistent local development experience across the monorepo.
The PHPSTAN constant guard causes PHPStan to exit early, so the
varTag.type error is never reported and the ignore annotation is
flagged as unnecessary.
Define the PHPSTAN constant so the defined('PHPSTAN') guard in
init_appsero_telemetry() works correctly during static analysis,
matching the pattern used in the core wp-graphql plugin.
- Upgrade phpstan/phpstan to ~2.1.2, szepeviktor/phpstan-wordpress
  to ^2.0.1, add phpstan-deprecation-rules ^2.0.1
- Align phpstan.neon.dist with core: remove bootstrapped main file,
  remove deprecated 1.x-only config options, add phpVersion bounds,
  add ignoreErrors for build assets
- Restore @var and @PHPStan-Ignore annotations on Appsero insights()
  call to fix type resolution (matching core pattern)
@jasonbahl jasonbahl merged commit f82c939 into main Apr 13, 2026
12 of 13 checks passed
@jasonbahl jasonbahl deleted the feat/ide-appsero-tracking branch April 13, 2026 20:23
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.

1 participant