;
use 5.012000;
use strict;
use warnings;
use JSON::XS ();
use Time::HiRes ();
my $header = qq|{"format":"json","version":1}\n|;
my $json = JSON::XS->new->utf8;
sub new {
my $class = shif
} //= Time::HiRes::time();
my $sock = AWS::XRay::sock() or return;
$sock->print($header, $json->encode({%$self}));
}
sub trace_header {
my $self = shift;
my $h = sprintf("Root=%s;P