Skip to content

Add anonymous usage telemetry #265

@mglaman

Description

@mglaman

Why?

I want to know why folks use drupal-check.

Anonymous usage tracking will not answer that specific problem. But it gives this project a purpose beyond a simpler way for agencies to productize PHPStan and phpstan-drupal without contributing back or sponsoring the development of the projects.

What for?

Drupal.org currently scans all contributed extensions for deprecations. Gabor took the effort to translate the artifacts of these scans into a consumable dashboard on Acquia's developer site: https://dev.acquia.com/drupal10

What if we could augment that with a richer dataset based on real-world usages?

It'd be nice to know what contrib modules exist, but that could leak agency-specific packages. So I'd rather just upload the error messages and the Drupal core version. The Drupal core version would help with other reporting – how many folks are not yet_ on 9.3 with more deprecations in 9.4 piling on.

How?

The tracking would be opt-in and anonymous with minimal data tracking. To be honest, I don't even know how I'd achieve this!

My first thought is that there'd need to be a flag in the project's composer.json. Like extra.drupal-check.allow-reporting: true.

What would be reported:

  • The deprecated messages returned
  • Current version of Drupal via \Drupal::VERSION constant
  • If running in a CI environment or locally (detect CI environment variable only.)

The data should be publicly available. Which has me thinking of spinning up an Elasticsearch instance and a Lamba function to handle incoming data. Anyone could read from the Elasticsearch instance to build data reports.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions