55
66use Doctrine \DBAL \Cache \QueryCacheProfile ;
77use Doctrine \DBAL \Connection ;
8+ use Doctrine \DBAL \Jaeger \Tag \DbalAutoCommitTag ;
89use Doctrine \DBAL \Jaeger \Tag \DbalErrorCodeTag ;
910use Doctrine \DBAL \Jaeger \Tag \DbalRowNumberTag ;
1011use Jaeger \Tag \DbInstanceTag ;
@@ -30,7 +31,8 @@ public function connect()
3031 ->start ('dbal.connect ' )
3132 ->addTag (new DbInstanceTag ($ this ->getDatabase ()))
3233 ->addTag (new DbUser ($ this ->getUsername ()))
33- ->addTag (new DbType ($ this ->getDatabasePlatform ()->getName ()));
34+ ->addTag (new DbType ($ this ->getDatabasePlatform ()->getName ()))
35+ ->addTag (new DbalAutoCommitTag ($ this ->isAutoCommit ()));
3436 try {
3537 parent ::connect ();
3638 } catch (\Exception $ e ) {
@@ -49,6 +51,7 @@ public function prepare($prepareString)
4951 ->addTag (new DbInstanceTag ($ this ->getDatabase ()))
5052 ->addTag (new DbUser ($ this ->getUsername ()))
5153 ->addTag (new DbType ($ this ->getDatabasePlatform ()->getName ()))
54+ ->addTag (new DbalAutoCommitTag ($ this ->isAutoCommit ()))
5255 ->addTag (new DbStatementTag ($ prepareString ));
5356 try {
5457 return parent ::prepare ($ prepareString );
@@ -68,6 +71,7 @@ public function executeQuery($query, array $params = [], $types = [], QueryCache
6871 ->addTag (new DbInstanceTag ($ this ->getDatabase ()))
6972 ->addTag (new DbUser ($ this ->getUsername ()))
7073 ->addTag (new DbType ($ this ->getDatabasePlatform ()->getName ()))
74+ ->addTag (new DbalAutoCommitTag ($ this ->isAutoCommit ()))
7175 ->addTag (new DbStatementTag ($ query ));
7276 try {
7377 return parent ::executeQuery ($ query , $ params , $ types , $ qcp );
@@ -87,6 +91,7 @@ public function executeUpdate($query, array $params = [], array $types = [])
8791 ->addTag (new DbInstanceTag ($ this ->getDatabase ()))
8892 ->addTag (new DbUser ($ this ->getUsername ()))
8993 ->addTag (new DbType ($ this ->getDatabasePlatform ()->getName ()))
94+ ->addTag (new DbalAutoCommitTag ($ this ->isAutoCommit ()))
9095 ->addTag (new DbStatementTag ($ query ));
9196 try {
9297 return parent ::executeUpdate ($ query , $ params , $ types );
@@ -105,7 +110,8 @@ public function query()
105110 ->start ('dbal.query ' )
106111 ->addTag (new DbInstanceTag ($ this ->getDatabase ()))
107112 ->addTag (new DbUser ($ this ->getUsername ()))
108- ->addTag (new DbType ($ this ->getDatabasePlatform ()->getName ()));
113+ ->addTag (new DbType ($ this ->getDatabasePlatform ()->getName ()))
114+ ->addTag (new DbalAutoCommitTag ($ this ->isAutoCommit ()));
109115 try {
110116 return parent ::query ();
111117 } catch (\Exception $ e ) {
@@ -123,7 +129,8 @@ public function exec($statement)
123129 ->start ('dbal.exec ' )
124130 ->addTag (new DbInstanceTag ($ this ->getDatabase ()))
125131 ->addTag (new DbUser ($ this ->getUsername ()))
126- ->addTag (new DbType ($ this ->getDatabasePlatform ()->getName ()));
132+ ->addTag (new DbType ($ this ->getDatabasePlatform ()->getName ()))
133+ ->addTag (new DbalAutoCommitTag ($ this ->isAutoCommit ()));
127134 try {
128135 $ rows = parent ::exec ($ statement );
129136 $ span ->addTag (new DbalRowNumberTag ($ rows ));
@@ -144,7 +151,8 @@ public function beginTransaction()
144151 ->start ('dbal.transaction ' )
145152 ->addTag (new DbInstanceTag ($ this ->getDatabase ()))
146153 ->addTag (new DbUser ($ this ->getUsername ()))
147- ->addTag (new DbType ($ this ->getDatabasePlatform ()->getName ()));
154+ ->addTag (new DbType ($ this ->getDatabasePlatform ()->getName ()))
155+ ->addTag (new DbalAutoCommitTag ($ this ->isAutoCommit ()));
148156 try {
149157 parent ::beginTransaction ();
150158 } catch (\Exception $ e ) {
@@ -162,7 +170,8 @@ public function commit()
162170 ->start ('dbal.commit ' )
163171 ->addTag (new DbInstanceTag ($ this ->getDatabase ()))
164172 ->addTag (new DbUser ($ this ->getUsername ()))
165- ->addTag (new DbType ($ this ->getDatabasePlatform ()->getName ()));
173+ ->addTag (new DbType ($ this ->getDatabasePlatform ()->getName ()))
174+ ->addTag (new DbalAutoCommitTag ($ this ->isAutoCommit ()));
166175 try {
167176 parent ::commit ();
168177 } catch (\Exception $ e ) {
@@ -180,7 +189,8 @@ public function rollBack()
180189 ->start ('dbal.rollback ' )
181190 ->addTag (new DbInstanceTag ($ this ->getDatabase ()))
182191 ->addTag (new DbUser ($ this ->getUsername ()))
183- ->addTag (new DbType ($ this ->getDatabasePlatform ()->getName ()));
192+ ->addTag (new DbType ($ this ->getDatabasePlatform ()->getName ()))
193+ ->addTag (new DbalAutoCommitTag ($ this ->isAutoCommit ()));
184194 try {
185195 return parent ::rollBack ();
186196 } catch (\Exception $ e ) {
0 commit comments