File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -474,8 +474,13 @@ internal static async Task<MySqlDataReader> CreateAsync(CommandListPosition comm
474
474
await dataReader . NextResultAsync ( ioBehavior , cancellationToken ) . ConfigureAwait ( false ) ;
475
475
}
476
476
}
477
- catch ( Exception )
477
+ catch ( Exception ex )
478
478
{
479
+ if ( activity is { IsAllDataRequested : true } )
480
+ {
481
+ activity . SetException ( ex ) ;
482
+ activity . Stop ( ) ;
483
+ }
479
484
dataReader . Dispose ( ) ;
480
485
throw ;
481
486
}
Original file line number Diff line number Diff line change @@ -36,7 +36,13 @@ internal static class ActivitySourceHelper
36
36
return activity ;
37
37
}
38
38
39
- public static void SetSuccess ( this Activity activity ) => activity . SetTag ( StatusCodeTagName , "OK" ) ;
39
+ public static void SetSuccess ( this Activity activity )
40
+ {
41
+ if ( activity . Duration == TimeSpan . Zero )
42
+ {
43
+ activity . SetTag ( StatusCodeTagName , "OK" ) ;
44
+ }
45
+ }
40
46
41
47
public static void SetException ( this Activity activity , Exception exception )
42
48
{
You can’t perform that action at this time.
0 commit comments