The author understands that the Lord knows him through and through. Fully understood and lovingly known. That certainty is a source of comfort and gives something to hold on to.
He himself knows God as the One who cares about the fate of his people (see Exodus 2:24–25).
What we read in Jeremiah 12:3 applies to him: But you, O LORD, know me; you see me, and test my heart toward you.
How beautiful when someone may know and confess this!
1 O LORD, you have searched me and known me!