Skip to content

Feature: Add run_event hook for possible NewRelic integration to measure execution time #280

@ovidiul

Description

@ovidiul

Some users might benefit from being able to measure the execution time and status of their scheduled events across a certain date range, and NewRelic could be one tool to help them view this better.

Would it be possible to add a hook for the run_event method where we measure the time the event took to run and the status of it?

Something like:

do_action('cron_control_event_completed', $event->get_action(), maybe_serialize( $event->get_args() ), $return, $execution_time);

added before the return statement.

I understand there are some concerns with the md5 hash encoding of the action, but I think users can further engineer their target events and add the necessary data into the event arguments.

Happy to work on a PR if this can be considered. Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions