In the analogy between prime numbers and knots, the prime number is thought sometimes as the circle of length $l([p]) = \text{log}\,p$. This is so you can express the zeta function as 
$$ \zeta(s) = \sum_{D\ge0} e^{-l(D)s}$$

where the sum goes over effective divisors on $\text{Spec}\,\mathbb Z$ and length is extended there by additivity. Similarly, you can do it to rewrite Dedekind zeta function for other number fields.

I wonder, **what is the right analogue of above formula** for a manifold with metric? Perhaps it should be:

1. integration over all closed curves of the expression $e^{-l(D)s}$
2. summation over positive sums of classes of closed geodesics.

I think I've heard something about definition 2, but I suspect if the two above are defined correctly they will be the same. Is it possible to formalize this definition? Do different formalizations lead to the same zeta-function?