- OPTIONAL ATTRIBUTES
- DELEGATED INSTANCE METHODS
- INSTANCE METHODS
- SEE ALSO
- COPYRIGHT AND LICENSE
OpenTracing::Implementation::DataDog::Client - A Client that sends off the spans
use alias OpenTracing::Implementation::DataDog::Client; my $datadog_client = ->new( http_user_agent => LWP::UserAgent->new(); host => 'localhost', port => '8126', path => 'v0.3/traces', ); # these are defaults
$datadog_client->send_span( $span );
The main responsabillity of this
Client is to provide the
send_span method, that will send the data to the local running DataDog agent.
This structure will be send of as a JSON string to the local installed DataDog agent.
The attributes below can be set during instantiation, but none are required and have sensible defaults, that may actually play nice with known DataDog environment variables
A HTTP User Agent that connects to the locally running DataDog agent. This will default to a LWP::UserAgent, but any User Agent will suffice, as long as it has a required delegate method
request, that takes a HTTP::Request object and returns a HTTP::Response compliant response object.
The scheme being used, should be either
https, defaults to
The host-name where the DataDog agent is running, which defaults to
localhost or the value of the
DD_AGENT_HOST environment variable if set.
The port-number the DataDog agent is listening at, which defaults to
8126 or the value of the
DD_TRACE_AGENT_PORT environment variable if set.
The path the DataDog agent is expecting requests to come in, which defaults to
The following method(s) are required by the DataDog::Tracer:
This will typically get called during
A boolean, that comes from
Gather required data from a single span and its context, tags and baggage items.
a hashreference with the following keys:
This data structure is specific for sending it through the DataDog agent and therefore can not be a intance method of the DataDog::Span object.
Sending traces to DataDog using Agent.
- DataDog Docs API Tracing
The DataDog Agent API Documentation.
Web user agent class
HTTP style request message
HTTP style response message
Theo van Hoesel <firstname.lastname@example.org>
'OpenTracing::Implementation::DataDog' is Copyright (C) 2019 .. 2021, 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.