Many of the Psalms were penned by King David. We know from the last Psalm that the entire book of Psalms was not organized into a single collection until after the Babylonian captivity, which was a few hundred years after the time of David.
David is the author of this Psalm and he understands God's promises to the nation of Israel (and effectively to all Christians as well) centuries before anybody ever heard of Jesus. Therefore, David could thank God in advance for what will happen, and that is the key point of this Psalm.
To summarize this Psalm in a single thought: We give gratitude to God who knows all about our lives before anything ever happens. Therefore, we praise Him because we realize He knows all things; He knows what will happen in our future and we trust in His guidance all for His glory.
This Psalm starts off with a theme that should be familiar to us by now. It is about giving it all we've got when we give God praise. In short, we praise God like we mean it.
The particular style we use to praise God is usually based on our personality and often on the way we are raised. That is not the issue here. The issue is about us telling God how grateful we are for our lives and mean it when we say it.
Let me explain this in context. David is praising God out of gratitude for his life. Most likely, this Psalm was written after God's promise that his descendant would build a great temple to God. This fact will become obvious in verse two.
The second half of verse one says in effect that David will praise God in front of the other gods. Most likely, this refers to other "deities" that were worshipped at that time. In essence, David is saying, "While other people living around me may be worshipping false deities, I will focus on worshipping the true God despite what others around me are doing."
David is grateful that God knows him in the same sense that God is aware of your life and my life. The idea is that we worship the true God of this world and we give it all that we've got. We don't waste our time with local deities (that is false-gods) that can and do draw us away from worshipping the true God.
Let us rejoice knowing that God keeps all of His promises and He is worthy of all our worship!