File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -35,12 +35,7 @@ public function connect()
3535 if ($ this ->isConnected ()) {
3636 return ;
3737 }
38- $ span = $ this ->tracer
39- ->start ('dbal.connect ' )
40- ->addTag (new DbInstanceTag ($ this ->getDatabase ()))
41- ->addTag (new DbUser ($ this ->getUsername ()))
42- ->addTag (new DbalAutoCommitTag ($ this ->isAutoCommit ()))
43- ->addTag (new DbalNestingLevelTag ($ this ->getTransactionNestingLevel ()));
38+ $ span = $ this ->tracer ->start ('dbal.connect ' );
4439 try {
4540 parent ::connect ();
4641 } catch (\Exception $ e ) {
@@ -49,7 +44,11 @@ public function connect()
4944 throw $ e ;
5045 } finally {
5146 if ($ this ->isConnected ()) {
52- $ span ->addTag (new DbType ($ this ->getDatabasePlatform ()->getName ()));
47+ $ span ->addTag (new DbInstanceTag ($ this ->getDatabase ()))
48+ ->addTag (new DbUser ($ this ->getUsername ()))
49+ ->addTag (new DbalAutoCommitTag ($ this ->isAutoCommit ()))
50+ ->addTag (new DbalNestingLevelTag ($ this ->getTransactionNestingLevel ()))
51+ ->addTag (new DbType ($ this ->getDatabasePlatform ()->getName ()));
5352 }
5453 $ this ->tracer ->finish ($ span );
5554 }
You can’t perform that action at this time.
0 commit comments