Skip to content

Commit

Permalink
Remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
rmccue committed Jan 27, 2020
1 parent eca315f commit ba59c9e
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions inc/namespace.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

namespace HM\Platform\XRay;

use Exception;
use function HM\Platform\get_aws_sdk;
use GuzzleHttp\TransferStats;

/*
Expand Down Expand Up @@ -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.
*
Expand Down

0 comments on commit ba59c9e

Please sign in to comment.