Obsidian is not open source but it uses plain text local files with Markdown support, so you are not locked in. All plugins for Obsidian are required to be open source. Also Obsidian contains no tracking/analytics, and the Sync product is E2E encrypted. The Obsidian API is also very flexible and allows you to do almost anything if you want to modify the app.
You can inspect network requests and see that nothing communicates to Obsidian servers. Since the app is Electron based you can also open up developer tools and unminify the JS code if you want to actually look at the code.