The correct way to gauge-fix in a path integral is to insert the Faddeev-Popov determinant, and add a delta-functional constraint. The final action contains three contributions: a Yang-Mills (I'm dealing with a Yang-Mills field for now), a ghost part and a gauge-fixed part.
So the partition function is then $$ Z[J] = \int \mathcal{D} A_{\mu}^{a} \mathcal{D} c_a \mathcal{D} \overline{c}_a \exp \left( i ( S_{YM} + S_{gh} + S_{gf} ) \right)$$ where $$ S_{gf} = - \int d^4 x \frac{1}{2 \xi} (\partial^{\mu} A_{\mu}^{a}) (\partial^{\nu} A_{\nu}^{a}) $$ is the gauge-fixed action.
Now I was wondering whether this doesn't make the partition function depend explicitly on the choice of gauge? I mean: we calculate stuff like correlation functions from the partition function. How are these results then independent of the specific gauge fixing condition we had? Or is this actually not a problem?