NAME
OpenTelemetry::Integration::LWP::UserAgent - OpenTelemetry integration for LWP::UserAgent
SYNOPSIS
use OpenTelemetry::Integration 'LWP::UserAgent';
# Or pass options to the integration
use OpenTelemetry::Integration 'LWP::UserAgent' => {
request_headers => [ ... ],
response_headers => [ ... ],
};
LWP::UserAgent->new->get('https://metacpan.org');
DESCRIPTION
See OpenTelemetry::Integration for more details.
Since this is a core module, it's included in the OpenTelemetry core distribution as well.
CONFIGURATION
request_headers
This integration can be configured to store specific request headers with every generated span. In order to do so, set this key to an array reference with the name of the request headers you want as strings.
The strings will be matched case-insensitively to the header names, and hyphens and underscores will be treated indistinctly. Otherwise, names will be matched literally.
Matching headers will be stored as span attributes under the http.request.header
namespace, as described in the semantic convention documentation.
response_headers
This integration can be configured to store specific response headers with every generated span. In order to do so, set this key to an array reference with the name of the response headers you want as strings.
The strings will be matched case-insensitively to the header names, and hyphens and underscores will be treated indistinctly. Otherwise, names will be matched literally.
Matching headers will be stored as span attributes under the http.response.header
namespace, as described in the semantic convention documentation.
COPYRIGHT
This software is copyright (c) 2023 by José Joaquín Atria.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.