def test_analytics_without_rate(self):
    with self.override_config('psycopg', dict(analytics_enabled=True)):
        conn = self._get_conn()
        conn.cursor().execute("select 'blah'")
        spans = self.get_spans()
        self.assertEqual(len(spans), 1)
        span = spans[0]
        self.assertEqual(span.get_metric(ANALYTICS_SAMPLE_RATE_KEY), 1.0)
def test_analytics_without_rate(self):
    with self.override_config('psycopg', dict(analytics_enabled=True)):
        conn = self._get_conn()
        conn.cursor().execute("select 'blah'")
        spans = self.get_spans()
        self.assertEqual(len(spans), 1)
        span = spans[0]
        self.assertEqual(span.get_metric(ANALYTICS_SAMPLE_RATE_KEY), 1.0)