5
5
6
6
use Doctrine \DBAL \Cache \QueryCacheProfile ;
7
7
use Doctrine \DBAL \Connection ;
8
+ use Doctrine \DBAL \Jaeger \Tag \DbalAutoCommitTag ;
8
9
use Doctrine \DBAL \Jaeger \Tag \DbalErrorCodeTag ;
9
10
use Doctrine \DBAL \Jaeger \Tag \DbalRowNumberTag ;
10
11
use Jaeger \Tag \DbInstanceTag ;
@@ -30,7 +31,8 @@ public function connect()
30
31
->start ('dbal.connect ' )
31
32
->addTag (new DbInstanceTag ($ this ->getDatabase ()))
32
33
->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 ()));
34
36
try {
35
37
parent ::connect ();
36
38
} catch (\Exception $ e ) {
@@ -49,6 +51,7 @@ public function prepare($prepareString)
49
51
->addTag (new DbInstanceTag ($ this ->getDatabase ()))
50
52
->addTag (new DbUser ($ this ->getUsername ()))
51
53
->addTag (new DbType ($ this ->getDatabasePlatform ()->getName ()))
54
+ ->addTag (new DbalAutoCommitTag ($ this ->isAutoCommit ()))
52
55
->addTag (new DbStatementTag ($ prepareString ));
53
56
try {
54
57
return parent ::prepare ($ prepareString );
@@ -68,6 +71,7 @@ public function executeQuery($query, array $params = [], $types = [], QueryCache
68
71
->addTag (new DbInstanceTag ($ this ->getDatabase ()))
69
72
->addTag (new DbUser ($ this ->getUsername ()))
70
73
->addTag (new DbType ($ this ->getDatabasePlatform ()->getName ()))
74
+ ->addTag (new DbalAutoCommitTag ($ this ->isAutoCommit ()))
71
75
->addTag (new DbStatementTag ($ query ));
72
76
try {
73
77
return parent ::executeQuery ($ query , $ params , $ types , $ qcp );
@@ -87,6 +91,7 @@ public function executeUpdate($query, array $params = [], array $types = [])
87
91
->addTag (new DbInstanceTag ($ this ->getDatabase ()))
88
92
->addTag (new DbUser ($ this ->getUsername ()))
89
93
->addTag (new DbType ($ this ->getDatabasePlatform ()->getName ()))
94
+ ->addTag (new DbalAutoCommitTag ($ this ->isAutoCommit ()))
90
95
->addTag (new DbStatementTag ($ query ));
91
96
try {
92
97
return parent ::executeUpdate ($ query , $ params , $ types );
@@ -105,7 +110,8 @@ public function query()
105
110
->start ('dbal.query ' )
106
111
->addTag (new DbInstanceTag ($ this ->getDatabase ()))
107
112
->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 ()));
109
115
try {
110
116
return parent ::query ();
111
117
} catch (\Exception $ e ) {
@@ -123,7 +129,8 @@ public function exec($statement)
123
129
->start ('dbal.exec ' )
124
130
->addTag (new DbInstanceTag ($ this ->getDatabase ()))
125
131
->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 ()));
127
134
try {
128
135
$ rows = parent ::exec ($ statement );
129
136
$ span ->addTag (new DbalRowNumberTag ($ rows ));
@@ -144,7 +151,8 @@ public function beginTransaction()
144
151
->start ('dbal.transaction ' )
145
152
->addTag (new DbInstanceTag ($ this ->getDatabase ()))
146
153
->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 ()));
148
156
try {
149
157
parent ::beginTransaction ();
150
158
} catch (\Exception $ e ) {
@@ -162,7 +170,8 @@ public function commit()
162
170
->start ('dbal.commit ' )
163
171
->addTag (new DbInstanceTag ($ this ->getDatabase ()))
164
172
->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 ()));
166
175
try {
167
176
parent ::commit ();
168
177
} catch (\Exception $ e ) {
@@ -180,7 +189,8 @@ public function rollBack()
180
189
->start ('dbal.rollback ' )
181
190
->addTag (new DbInstanceTag ($ this ->getDatabase ()))
182
191
->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 ()));
184
194
try {
185
195
return parent ::rollBack ();
186
196
} catch (\Exception $ e ) {
0 commit comments