The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

OpenTracing::Implementation::DataDog::ID - 64bit integers for DataDog

SYNOPSIS

    use OpenTracing::Implementation::DataDog::ID qw/random_datadog_id/;
    
    my $data_struct = {
        some_id => random_datadog_id();
    };

and later:

    print $data_struct->{some_id}->TO_JSON;

DESCRIPTION

This package ensures nice 64bit integers, as expected by DataDog. However, some architectures do not support 64bit ints, and only go for 4 bytes.

Under the hood, this is just a nice abstract way to deal with a Math::BigInt.

EXPORTS OK

The following subroutines can be imported into your namespance:

random_datadog_id

Generates a 64bit integer (or actually a 63bit)

SEE ALSO

OpenTracing::Implementation::DataDog

Sending traces to DataDog using Agent.

Trace and Span ID Formats

If you write code that interacts directly with Datadog tracing spans and traces, here’s what you need to know about how span IDs and trace IDs are generated and accepted by Datadog tracing libraries.

AUTHOR

Theo van Hoesel <tvanhoesel@perceptyx.com>

COPYRIGHT AND LICENSE

'OpenTracing::Implementation::DataDog' is Copyright (C) 2019 .. 2023, Perceptyx Inc

This library is free software; you can redistribute it and/or modify it under the terms of the Artistic License 2.0.

This package is distributed in the hope that it will be useful, but it is provided "as is" and without any express or implied warranties.

For details, see the full text of the license in the file LICENSE.

2 POD Errors

The following errors were encountered while parsing the POD:

Around line 83:

'=item' outside of any '=over'

Around line 86:

Non-ASCII character seen before =encoding in 'here’s'. Assuming UTF-8