UNPKG

@arizeai/phoenix-client

Version:

A client for the Phoenix API

10 lines (8 loc) 303 B
import { AttributeValue } from "@opentelemetry/api"; export function objectAsAttributes<T extends Record<string, unknown>>( obj: T ): Record<string, AttributeValue> { return Object.fromEntries( Object.entries(obj).filter(([_, value]) => value !== null) ) as Record<string, AttributeValue>; }