// Copyright The OpenTelemetry Authors// SPDX-License-Identifier: Apache-2.0package telemetry // import "go.opentelemetry.io/otel/trace/internal/telemetry"// Attr is a key-value pair.typeAttrstruct { Key string`json:"key,omitempty"` Value Value`json:"value,omitempty"`}// String returns an Attr for a string value.func (, string) Attr {returnAttr{, StringValue()}}// Int64 returns an Attr for an int64 value.func ( string, int64) Attr {returnAttr{, Int64Value()}}// Int returns an Attr for an int value.func ( string, int) Attr {returnInt64(, int64())}// Float64 returns an Attr for a float64 value.func ( string, float64) Attr {returnAttr{, Float64Value()}}// Bool returns an Attr for a bool value.func ( string, bool) Attr {returnAttr{, BoolValue()}}// Bytes returns an Attr for a []byte value.// The passed slice must not be changed after it is passed.func ( string, []byte) Attr {returnAttr{, BytesValue()}}// Slice returns an Attr for a []Value value.// The passed slice must not be changed after it is passed.func ( string, ...Value) Attr {returnAttr{, SliceValue(...)}}// Map returns an Attr for a map value.// The passed slice must not be changed after it is passed.func ( string, ...Attr) Attr {returnAttr{, MapValue(...)}}// Equal reports whether a is equal to b.func ( Attr) ( Attr) bool {return .Key == .Key && .Value.Equal(.Value)}
The pages are generated with Goldsv0.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.