@@ -111,7 +111,7 @@ private function wrappedPrepare($sql): JaegerStatementWrapper
111111 public function executeQuery (string $ sql , array $ params = [], $ types = [], ?QueryCacheProfile $ qcp = null ): Result
112112 {
113113 $ span = $ this ->tracer
114- ->start ('dbal.execute ' )
114+ ->start ('dbal.query ' )
115115 ->addTag (new DbType (get_class ($ this ->getDatabasePlatform ())))
116116 ->addTag (new DbalAutoCommitTag ($ this ->isAutoCommit ()))
117117 ->addTag (new DbStatementTag ($ this ->cutLongSql ($ sql )))
@@ -127,7 +127,7 @@ public function executeQuery(string $sql, array $params = [], $types = [], ?Quer
127127 }
128128 }
129129
130- public function executeUpdate ( string $ sql , array $ params = [], array $ types = []): int
130+ public function executeStatement ( $ sql , array $ params = [], array $ types = [])
131131 {
132132 $ span = $ this ->tracer
133133 ->start ('dbal.execute ' )
@@ -136,47 +136,7 @@ public function executeUpdate(string $sql, array $params = [], array $types = []
136136 ->addTag (new DbStatementTag ($ this ->cutLongSql ($ sql )))
137137 ->addTag (new DbalNestingLevelTag ($ this ->getTransactionNestingLevel ()));
138138 try {
139- return parent ::executeUpdate ($ sql , $ params , $ types );
140- } catch (\Exception $ e ) {
141- $ span ->addTag (new DbalErrorCodeTag ($ e ->getCode ()))
142- ->addTag (new ErrorTag ());
143- throw $ e ;
144- } finally {
145- $ this ->tracer ->finish ($ span );
146- }
147- }
148-
149- public function query (string $ sql ): Result
150- {
151- $ span = $ this ->tracer
152- ->start ('dbal.query ' )
153- ->addTag (new DbStatementTag ($ this ->cutLongSql ($ sql )))
154- ->addTag (new DbType (get_class ($ this ->getDatabasePlatform ())))
155- ->addTag (new DbalAutoCommitTag ($ this ->isAutoCommit ()))
156- ->addTag (new DbalNestingLevelTag ($ this ->getTransactionNestingLevel ()));
157- try {
158- return parent ::query ($ sql );
159- } catch (\Exception $ e ) {
160- $ span ->addTag (new DbalErrorCodeTag ($ e ->getCode ()))
161- ->addTag (new ErrorTag ());
162- throw $ e ;
163- } finally {
164- $ this ->tracer ->finish ($ span );
165- }
166- }
167-
168- public function exec (string $ sql ): int
169- {
170- $ span = $ this ->tracer
171- ->start ('dbal.exec ' )
172- ->addTag (new DbType (get_class ($ this ->getDatabasePlatform ())))
173- ->addTag (new DbalAutoCommitTag ($ this ->isAutoCommit ()))
174- ->addTag (new DbalNestingLevelTag ($ this ->getTransactionNestingLevel ()));
175- try {
176- $ rows = parent ::exec ($ sql );
177- $ span ->addTag (new DbalRowNumberTag ($ rows ));
178-
179- return $ rows ;
139+ return parent ::executeStatement ($ sql , $ params , $ types );
180140 } catch (\Exception $ e ) {
181141 $ span ->addTag (new DbalErrorCodeTag ($ e ->getCode ()))
182142 ->addTag (new ErrorTag ());
0 commit comments