Source File
error_type.go
Belonging Package
go.opentelemetry.io/otel/semconv/v1.37.0
// Copyright The OpenTelemetry Authors// SPDX-License-Identifier: Apache-2.0package semconv // import "go.opentelemetry.io/otel/semconv/v1.37.0"import ()// ErrorType returns an [attribute.KeyValue] identifying the error type of err.func ( error) attribute.KeyValue {if == nil {return ErrorTypeOther}:= reflect.TypeOf()var stringif .PkgPath() == "" && .Name() == "" {// Likely a builtin type.= .String()} else {= fmt.Sprintf("%s.%s", .PkgPath(), .Name())}if == "" {return ErrorTypeOther}return ErrorTypeKey.String()}
![]() |
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. |