Skip to content

Commit

Permalink
Document recently added metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
jjatria committed Nov 6, 2023
1 parent 7ada606 commit e6a85cd
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/OpenTelemetry/Exporter/OTLP.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
36 changes: 36 additions & 0 deletions lib/OpenTelemetry/Exporter/OTLP.pod
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,29 @@ Reported with the following attributes:

=over

=item C<timeout>

The connection to the collector timed out.

=item C<socket_error>

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<ssl_error>

There was an error either establishing an SSL connection, or terminating a
previous SSL connection.

=item C<eof_error>

There was an unexpected end of stream.

=item C<parse_error>

There was an error parsing the URL to send the exported data to.

=item C<zlib_error>

An error was encountered when compressing payload.
Expand All @@ -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<otel.otlp_exporter.request_duration>

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<status>

Set to the HTTP status code of the response.

=back

=back

=head1 SEE ALSO
Expand Down

0 comments on commit e6a85cd

Please sign in to comment.