Source File
status.go
Belonging Package
go.opentelemetry.io/otel/trace/internal/telemetry
// Copyright The OpenTelemetry Authors// SPDX-License-Identifier: Apache-2.0package telemetry // import "go.opentelemetry.io/otel/trace/internal/telemetry"// StatusCode is the status of a Span.//// For the semantics of status codes see// https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/api.md#set-statustype StatusCode int32const (// StatusCodeUnset is the default status.StatusCodeUnset StatusCode = 0// StatusCodeOK is used when the Span has been validated by an Application// developer or Operator to have completed successfully.StatusCodeOK StatusCode = 1// StatusCodeError is used when the Span contains an error.StatusCodeError StatusCode = 2)var statusCodeStrings = []string{"Unset","OK","Error",}func ( StatusCode) () string {if >= 0 && int() < len(statusCodeStrings) {return statusCodeStrings[]}return "<unknown telemetry.StatusCode>"}// Status defines a logical error model that is suitable for different// programming environments, including REST APIs and RPC APIs.type Status struct {// A developer-facing human readable error message.Message string `json:"message,omitempty"`// The status code.Code StatusCode `json:"code,omitempty"`}
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |