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

mundanity’s picture

Status: Active » Postponed (maintainer needs more info)

Not 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!

mundanity’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)

I'm not sure this provides other modules with any super interesting integration points that they could not otherwise implement.