From e6a85cd60f55ce15192372f830cc2f295612e54e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Joaqu=C3=ADn=20Atria?= Date: Mon, 6 Nov 2023 23:35:03 +0000 Subject: [PATCH] Document recently added metrics --- lib/OpenTelemetry/Exporter/OTLP.pm | 2 +- lib/OpenTelemetry/Exporter/OTLP.pod | 36 +++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/lib/OpenTelemetry/Exporter/OTLP.pm b/lib/OpenTelemetry/Exporter/OTLP.pm index 7ee12fa..60ceb8b 100644 --- a/lib/OpenTelemetry/Exporter/OTLP.pm +++ b/lib/OpenTelemetry/Exporter/OTLP.pm @@ -208,11 +208,11 @@ class OpenTelemetry::Exporter::OTLP :does(OpenTelemetry::Exporter) { case(m/^Could not connect /) { 'socket_error' } case(m/^Could not .* socket /) { 'socket_error' } case(m/^Socket closed /) { 'socket_error' } + case(m/^Wide character in write/) { 'socket_error' } case(m/^Error halting .* SSL /) { 'ssl_error' } case(m/^SSL connection failed /) { 'ssl_error' } case(m/^Unexpected end of stream/) { 'eof_error' } case(m/^Cannot parse/) { 'parse_error' } - case(m/^Wide character in write/) { 'write_error' } default { $metrics->inc_counter( 'otel.otlp_exporter.failure', diff --git a/lib/OpenTelemetry/Exporter/OTLP.pod b/lib/OpenTelemetry/Exporter/OTLP.pod index 786c61b..985b1e9 100644 --- a/lib/OpenTelemetry/Exporter/OTLP.pod +++ b/lib/OpenTelemetry/Exporter/OTLP.pod @@ -95,6 +95,29 @@ Reported with the following attributes: =over +=item C + +The connection to the collector timed out. + +=item C + +There was a socket-related error while sending the data to the collector. +This could be that the socket couldn't be opened, or closed, or written +to, or otherwise properly configured. + +=item C + +There was an error either establishing an SSL connection, or terminating a +previous SSL connection. + +=item C + +There was an unexpected end of stream. + +=item C + +There was an error parsing the URL to send the exported data to. + =item C An error was encountered when compressing payload. @@ -117,6 +140,19 @@ not sent if no compression is done. Set to the size of the request content before compression is done. +=item C + +Set to the number of seconds, as a fraction, that the request took to +complete. It is set with the following attributes: + +=over + +=item C + +Set to the HTTP status code of the response. + +=back + =back =head1 SEE ALSO