package codes

Import Path
	go.opentelemetry.io/otel/codes (on go.dev)

Dependency Relation
	imports 3 packages, and imported by one package

Involved Source Files codes.go Package codes defines the canonical error codes used by OpenTelemetry. It conforms to [the OpenTelemetry specification](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.20.0/specification/trace/api.md#set-status).
Package-Level Type Names (only one, which is exported)
/* sort exporteds by: | */
Code is an 32-bit representation of a status state. MarshalJSON returns c as the JSON encoding of c. String returns the Code as a string. UnmarshalJSON unmarshals b into the Code. This is based on the functionality in the gRPC codes package: https://github.com/grpc/grpc-go/blob/bb64fee312b46ebee26be43364a7a966033521b1/codes/codes.go#L218-L244 *Code : encoding/json.Marshaler *Code : encoding/json.Unmarshaler Code : fmt.Stringer func go.opentelemetry.io/otel/trace.Span.SetStatus(code Code, description string) const Error const Ok const Unset
Package-Level Variables (total 2, neither is exported)
Package-Level Constants (total 4, in which 3 are exported)
Error indicates the operation contains an error. NOTE: The error code in OTLP is 2. The value of this enum is only relevant to the internals of the Go SDK.
Ok indicates operation has been validated by an Application developers or Operator to have completed successfully, or contain no error. NOTE: The Ok code in OTLP is 1. The value of this enum is only relevant to the internals of the Go SDK.
Unset is the default status code.