-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathplugin.php
More file actions
24 lines (19 loc) · 881 Bytes
/
plugin.php
File metadata and controls
24 lines (19 loc) · 881 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php
/**
* Plugin Name: AWS X-Ray
* Description: HM Platform plugin for sending data to AWS X-Ray
* Author: Human Made
* Version: 1.2.3
*/
namespace HM\Platform\XRay;
if ( ! function_exists( __NAMESPACE__ . '\\bootstrap' ) ) {
// Exit early in the event functions are not available. This likely means X-Ray is
// disabled in your environment.
return;
}
require_once __DIR__ . '/inc/query_monitor/namespace.php';
add_filter( 'query', __NAMESPACE__ . '\\filter_mysql_query' );
add_action( 'requests-requests.before_request', __NAMESPACE__ . '\\trace_requests_request', 10, 5 );
add_filter( 'hm_platform_cloudwatch_error_handler_error', __NAMESPACE__ . '\\on_cloudwatch_error_handler_error' );
add_filter( 'hm_platform.aws_sdk.params', __NAMESPACE__ . '\\on_hm_platform_aws_sdk_params' );
add_action( 'plugins_loaded', __NAMESPACE__ . '\\Query_Monitor\\bootstrap', 9 );