mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-24 23:43:32 -06:00
Bumps [go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc](https://github.com/open-telemetry/opentelemetry-go) from 1.34.0 to 1.35.0. - [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.34.0...v1.35.0) --- updated-dependencies: - dependency-name: go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
40 lines
1.1 KiB
Go
40 lines
1.1 KiB
Go
// Copyright The OpenTelemetry Authors
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
package telemetry // import "go.opentelemetry.io/otel/trace/internal/telemetry"
|
|
|
|
// For the semantics of status codes see
|
|
// https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/api.md#set-status
|
|
type StatusCode int32
|
|
|
|
const (
|
|
// The default status.
|
|
StatusCodeUnset StatusCode = 0
|
|
// The Span has been validated by an Application developer or Operator to
|
|
// have completed successfully.
|
|
StatusCodeOK StatusCode = 1
|
|
// The Span contains an error.
|
|
StatusCodeError StatusCode = 2
|
|
)
|
|
|
|
var statusCodeStrings = []string{
|
|
"Unset",
|
|
"OK",
|
|
"Error",
|
|
}
|
|
|
|
func (s StatusCode) String() string {
|
|
if s >= 0 && int(s) < len(statusCodeStrings) {
|
|
return statusCodeStrings[s]
|
|
}
|
|
return "<unknown telemetry.StatusCode>"
|
|
}
|
|
|
|
// The Status type 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"`
|
|
}
|