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.
It would be great if we could route performance details to an external application without writing to the database.
Comment | File | Size | Author |
---|---|---|---|
#4 | performance.2033707.patch | 7.76 KB | bceyssens |
Comments
Comment #1
malc0mn CreditAttribution: malc0mn commentedhmmm... Implementing a new hook wouldn't cut it I think... Adding some sort of setting that allows you to write a custom function containing your logic to store the data. The function is passed an object containing the data and you do with it as you please.
It could be as simple as:
Would need logic to read the data back again to fill the detail page, that's a different story...
Comment #2
Anonymous (not verified) CreditAttribution: Anonymous commentedThat could be left up to whatever module is routing the performance data elsewhere.
Think of it like using core's Syslog module instead of DBLog. Like I currently use Syslog to ship Drupal log messages to Logstash to be parsed and shipped elsewhere (such as Elasticsearch for storage), I'd love to be able to ship these performance metrics to something like statsd (probably via Logstash also, but that doesn't matter on the Drupal side).
Comment #3
malc0mn CreditAttribution: malc0mn commentedThe syslog vs dblog is implemented using a hook:
Although it's the Drupal way of doing things, I'm not sure it's suitable in the performance module. I'm afraid that this will have quite an impact especially for sites with lots of modules, hence my previously proposed approach.
I would like to be as Drupal standard as possible though... And using a hook is nice and clean...
Edit: but when detailed logging is enabled and we would use a hook approach like hook_watchdog, it would be triggered on every page load which I simply do not find acceptable...
Comment #4
bceyssensComment #5
malc0mn CreditAttribution: malc0mn commentedPatch applied, modified a bit and backported to D6.
Available in next release.