package attribute

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

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

Index

Functions

func AsBoolSlice

func AsBoolSlice(v interface{}) []bool

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

func AsFloat64Slice

func AsFloat64Slice(v interface{}) []float64

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

func AsInt64Slice

func AsInt64Slice(v interface{}) []int64

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

func AsStringSlice

func AsStringSlice(v interface{}) []string

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

func BoolSliceValue

func BoolSliceValue(v []bool) interface{}

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

func Float64SliceValue

func Float64SliceValue(v []float64) interface{}

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

func Int64SliceValue

func Int64SliceValue(v []int64) interface{}

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

func StringSliceValue

func StringSliceValue(v []string) interface{}

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

Source Files

attribute.go

Version
v1.34.0 (latest)
Published
Jan 17, 2025
Platform
linux/amd64
Imports
1 packages
Last checked
2 hours ago

Tools for package owners.