File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/Instrumentation/PDO/src Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -123,7 +123,7 @@ public static function register(): void
123123
124124 Context::storage ()->attach ($ span ->storeInContext ($ parent ));
125125 if (self ::isSqlCommenterEnabled () && $ sqlStatement !== 'undefined ' ) {
126- $ sqlStatement = self ::appendSqlComments ($ sqlStatement );
126+ $ sqlStatement = self ::appendSqlComments ($ sqlStatement, true );
127127 $ span ->setAttributes ([
128128 TraceAttributes::DB_QUERY_TEXT => $ sqlStatement ,
129129 ]);
@@ -159,7 +159,7 @@ public static function register(): void
159159
160160 Context::storage ()->attach ($ span ->storeInContext ($ parent ));
161161 if (self ::isSqlCommenterEnabled () && $ sqlStatement !== 'undefined ' ) {
162- $ sqlStatement = self ::appendSqlComments ($ sqlStatement );
162+ $ sqlStatement = self ::appendSqlComments ($ sqlStatement, true );
163163 $ span ->setAttributes ([
164164 TraceAttributes::DB_QUERY_TEXT => $ sqlStatement ,
165165 ]);
@@ -378,7 +378,7 @@ private static function isSqlCommenterEnabled(): bool
378378 return filter_var (get_cfg_var ('otel.instrumentation.pdo.sql_commenter ' ), FILTER_VALIDATE_BOOLEAN , FILTER_NULL_ON_FAILURE ) ?? false ;
379379 }
380380
381- private static function appendSqlComments (string $ query , bool $ withTraceContext = true ): string
381+ private static function appendSqlComments (string $ query , bool $ withTraceContext ): string
382382 {
383383 $ comments = [];
384384 if ($ withTraceContext ) {
You can’t perform that action at this time.
0 commit comments