package attribute

import "go.opentelemetry.io/otel/attribute/internal"

Package attribute provide several helper functions for some commonly used logic of processing attributes.

Index

Functions

func AsBoolSlice

func AsBoolSlice(v any) []bool

AsBoolSlice converts a bool array into a slice into with same elements as array.

func AsFloat64Slice

func AsFloat64Slice(v any) []float64

AsFloat64Slice converts a float64 array into a slice into with same elements as array.

func AsInt64Slice

func AsInt64Slice(v any) []int64

AsInt64Slice converts an int64 array into a slice into with same elements as array.

func AsStringSlice

func AsStringSlice(v any) []string

AsStringSlice converts a string array into a slice into with same elements as array.

func BoolSliceValue

func BoolSliceValue(v []bool) any

BoolSliceValue converts a bool slice into an array with same elements as slice.

func Float64SliceValue

func Float64SliceValue(v []float64) any

Float64SliceValue converts a float64 slice into an array with same elements as slice.

func Int64SliceValue

func Int64SliceValue(v []int64) any

Int64SliceValue converts an int64 slice into an array with same elements as slice.

func StringSliceValue

func StringSliceValue(v []string) any

StringSliceValue converts a string slice into an array with same elements as slice.

Source Files

attribute.go

Version
v1.38.0
Published
Aug 29, 2025
Platform
js/wasm
Imports
1 packages
Last checked
49 minutes ago

Tools for package owners.