From ba59c9ee7a4cfb37ba325d2e3661ea3d7115e050 Mon Sep 17 00:00:00 2001 From: Ryan McCue Date: Mon, 27 Jan 2020 17:25:33 +0000 Subject: [PATCH] Remove unused code --- inc/namespace.php | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/inc/namespace.php b/inc/namespace.php index 56d6ef5..83c33ae 100644 --- a/inc/namespace.php +++ b/inc/namespace.php @@ -2,8 +2,6 @@ namespace HM\Platform\XRay; -use Exception; -use function HM\Platform\get_aws_sdk; use GuzzleHttp\TransferStats; /* @@ -170,25 +168,6 @@ function trace_wpdb_query( string $query, float $start_time, float $end_time, $e send_trace_to_daemon( $trace ); } -/** - * Send a XRay trace document to AWS using the HTTP API. - * - * This is slower than using the XRay Daemon, but more convenient. - * - * @param array $trace - */ -function send_trace_to_aws( array $trace ) { - try { - $response = get_aws_sdk()->createXRay( [ 'version' => '2016-04-12' ] )->putTraceSegments( - [ - 'TraceSegmentDocuments' => [ json_encode( $trace ) ], // @codingStandardsIgnoreLine wp_json_encode not available. - ] - ); - } catch ( Exception $e ) { - trigger_error( $e->getMessage(), E_USER_WARNING ); // @codingStandardsIgnoreLine trigger_error ok - } -} - /** * Send a XRay trace document to AWS using the local daemon running on port 2000. *