def METHOD_NAME(self):
    # ensures that SQL errors are reported
    with pytest.raises(ProgrammingError):
        with self.connection() as conn:
            conn.execute("SELECT * FROM a_wrong_table").fetchall()
    spans = self.memory_exporter.get_finished_spans()
    # one span for the connection and one for the query
    self.assertEqual(len(spans), 2)
    span = spans[1]
    # span fields
    self.assertEqual(span.name, "SELECT opentelemetry-tests")
    self.assertEqual(
        span.attributes.get(SpanAttributes.DB_STATEMENT),
        "SELECT * FROM a_wrong_table",
    )
    self.assertEqual(
        span.attributes.get(SpanAttributes.DB_NAME), self.SQL_DB
    )
    self.check_meta(span)
    self.assertTrue(span.end_time - span.start_time > 0)
    # check the error
    self.assertIs(
        span.status.status_code,
        trace.StatusCode.ERROR,
    )
    self.assertIn("a_wrong_table", span.status.description)