package codes

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

Dependency Relation
	imports 4 packages, and imported by 6 packages

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)
/* sort 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 : expvar.Var Code : fmt.Stringer *Code : github.com/goccy/go-json.Marshaler *Code : github.com/goccy/go-json.Unmarshaler func go.opentelemetry.io/otel/sdk/trace.ReadWriteSpan.SetStatus(code Code, description string) func go.opentelemetry.io/otel/trace.Span.SetStatus(code Code, description string) func go.opentelemetry.io/otel/trace/noop.Span.SetStatus(Code, string) const Error const Ok const Unset
Package-Level Constants (total 3)
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.