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 AsSlice

func AsSlice[T bool | int64 | float64 | string](v any) []T

AsSlice convert an array into a slice into with same elements as array.

func SliceValue

func SliceValue[T bool | int64 | float64 | string](v []T) any

SliceValue convert a slice into an array with same elements as slice.

Source Files

attribute.go

Version
v1.11.2
Published
Dec 5, 2022
Platform
js/wasm
Imports
1 packages
Last checked
13 minutes ago

Tools for package owners.