(input: unknown)
| 395 | } |
| 396 | |
| 397 | private normalizeLabels(input: unknown): Record<string, string> { |
| 398 | if (!input || typeof input !== 'object') { |
| 399 | return {}; |
| 400 | } |
| 401 | |
| 402 | const entries = Object.entries(input as Record<string, unknown>).filter( |
| 403 | ([, value]) => typeof value === 'string', |
| 404 | ) as [string, string][]; |
| 405 | |
| 406 | return Object.fromEntries(entries); |
| 407 | } |
| 408 | |
| 409 | private toNanoseconds(date: Date): string { |
| 410 | return (BigInt(date.getTime()) * 1000000n).toString(); |