NAME
OpenTelemetry::Constants - Constants used by OpenTelemetry
SYNOPSIS
use OpenTelemetry::Constants -span_status;
use OpenTelemetry::Constants
-trace_export => { -as => sub { shift =~ s/^TRACE_EXPORT_//r } };
DESCRIPTION
This package includes constants used by different parts of OpenTelemetry.
It uses Exporter::Tiny to make it easier to export these symbols in a way that is most helpful depending on the context. Please look at the documentation of that module for details on what is supported.
CONSTANTS
Span Status Codes
These constants are used to specify the status of a span once it has completed. They can be imported individually, or with the span_status
tag. They are also imported when using the span
tag.
- SPAN_STATUS_UNSET
-
The status of a span when no status has been set. This is the default value.
- SPAN_STATUS_OK
-
The status of a span that has been marked as having completed successfully by an application.
- SPAN_STATUS_ERROR
-
The status of a span that has been marked as not having completed successfully by an application.
Span Kinds
These constants are used to specify the type of the span. They can be imported individually, or with the span_kind
tag. They are also imported when using the span
tag.
- SPAN_KIND_INTERNAL
-
The span is internal to an application, and is not at one of its boundaries (eg. with other applications). If no kind is specified, this is the default value.
- SPAN_KIND_SERVER
-
The span covers the server-side handling of some remote network request.
- SPAN_KIND_CLIENT
-
The span describes a request to a remote service.
- SPAN_KIND_PRODUCER
-
The span describes a message sent to a broker. Unlike the client and server kinds above, the action represented by this span ends once the broker accepts the message, even if the logical processing of that message can take longer.
- SPAN_KIND_CONSUMER
-
The span describes a consumer receiving a message from a broker.
Trace Export Results
These constants are used to distinguish the result of a trace export operation. They can be imported individually, or with the trace_export
tag. They are also imported when using the trace
tag.
- TRACE_EXPORT_SUCCESS
-
Marks an export operation as a success.
- TRACE_EXPORT_FAILURE
-
Marks an export operation as a failure.
- TRACE_EXPORT_TIMEOUT
-
Marks an export operation that was interrupted because it took too long.
Placeholder Invalid IDs
These constants are used as global null values for span and trace IDs. They can be imported individually.
- INVALID_SPAN_ID
-
Returns a constant ID that can be used to identify an invalid span in bytes. This is also imported when using the
span
tag. - INVALID_TRACE_ID
-
Returns a constant ID that can be used to identify an invalid trace in bytes. This is also imported when using the
trace
tag. - HEX_INVALID_SPAN_ID
-
Returns a constant ID that can be used to identify an invalid span as a hexadecimal string in lowercase. This is also imported when using the
span
tag. - HEX_INVALID_TRACE_ID
-
Returns a constant ID that can be used to identify an invalid trace as a hexadecimal string in lowercase. This is also imported when using the
trace
tag.
COPYRIGHT AND LICENSE
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.