// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0

package 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  string
	if .PkgPath() == "" && .Name() == "" {
		// Likely a builtin type.
		 = .String()
	} else {
		 = fmt.Sprintf("%s.%s", .PkgPath(), .Name())
	}

	if  == "" {
		return ErrorTypeOther
	}
	return ErrorTypeKey.String()
}