• 🕐 Get current time in nanoseconds since Unix epoch.

    Returns the current time as a nanosecond timestamp string, which is the standard format for OpenTelemetry timestamps.

    Returns Nanos

    Current time in nanoseconds as a string

    const now = getCurrentTimeNanos();
    // Result: "1640995200000000000" (example timestamp)

    // Use in telemetry data
    const logRecord: LogRecord = {
    timeUnixNano: getCurrentTimeNanos(),
    observedTimeUnixNano: getCurrentTimeNanos(),
    // ... other fields
    };