Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
To enable use os StatsD by third party modules (contrib or custom), the module could define
- hook_statsd_info to retrieve a list of supported metrics with their descriptions
- hook_statsd_metrics to return values for all/some of the supported metrics
This way, you would be able to add the corresponding hook to apachesolr module to report on index document counts, for instance.
Another use case like #2360055: Report queue API statistics would be easy to solve, perhaps in a statsd_queue submodule.
Comments
Comment #1
mundanity CreditAttribution: mundanity commentedNot sure I see the need for this when other modules can fairly easily just call statsd_call() where they need. Happy to be convinced otherwise though!
Comment #2
mundanity CreditAttribution: mundanity commentedI'm not sure this provides other modules with any super interesting integration points that they could not otherwise implement.