View Source OpenTelemetry.SemConv.OtelAttributes (OpenTelemetry.SemConv v1.27.0)
OpenTelemetry Semantic Conventions for Otel attributes.
Summary
Types
Name of the code, either "OK" or "ERROR". MUST NOT be set if the status code is UNSET.
Functions
The name of the instrumentation scope - (InstrumentationScope.Name
in OTLP).
The version of the instrumentation scope - (InstrumentationScope.Version
in OTLP).
Name of the code, either "OK" or "ERROR". MUST NOT be set if the status code is UNSET.
Description of the Status if it has a value, otherwise not set.
Types
@type otel_status_code_values() :: %{ok: :OK, error: :ERROR}
Name of the code, either "OK" or "ERROR". MUST NOT be set if the status code is UNSET.
Enum Values
:ok
- The operation has been validated by an Application developer or Operator to have completed successfully.:error
- The operation contains an error.
Functions
@spec otel_scope_name() :: :"otel.scope.name"
The name of the instrumentation scope - (InstrumentationScope.Name
in OTLP).
Value type
Value must be of type atom() | String.t()
.
Examples
["io.opentelemetry.contrib.mongodb"]
iex> OpenTelemetry.SemConv.OtelAttributes.otel_scope_name()
:"otel.scope.name"
?OTEL_SCOPE_NAME.
'otel.scope.name'
@spec otel_scope_version() :: :"otel.scope.version"
The version of the instrumentation scope - (InstrumentationScope.Version
in OTLP).
Value type
Value must be of type atom() | String.t()
.
Examples
["1.0.0"]
iex> OpenTelemetry.SemConv.OtelAttributes.otel_scope_version()
:"otel.scope.version"
?OTEL_SCOPE_VERSION.
'otel.scope.version'
@spec otel_status_code() :: :"otel.status_code"
Name of the code, either "OK" or "ERROR". MUST NOT be set if the status code is UNSET.
iex> OpenTelemetry.SemConv.OtelAttributes.otel_status_code()
:"otel.status_code"
iex> OpenTelemetry.SemConv.OtelAttributes.otel_status_code_values().ok
:OK
iex> %{OpenTelemetry.SemConv.OtelAttributes.otel_status_code() => OpenTelemetry.SemConv.OtelAttributes.otel_status_code_values().ok}
%{:"otel.status_code" => :OK}
?OTEL_STATUS_CODE.
'otel.status_code'
?OTEL_STATUS_CODE_VALUES_OK.
'OK'
#{?OTEL_STATUS_CODE => ?OTEL_STATUS_CODE_VALUES_OK}.
#{'otel.status_code' => 'OK'}
@spec otel_status_code_values() :: otel_status_code_values()
@spec otel_status_description() :: :"otel.status_description"
Description of the Status if it has a value, otherwise not set.
Value type
Value must be of type atom() | String.t()
.
Examples
["resource not found"]
iex> OpenTelemetry.SemConv.OtelAttributes.otel_status_description()
:"otel.status_description"
?OTEL_STATUS_DESCRIPTION.
'otel.status_description'