@@ -49,7 +49,6 @@ public ServerSession(ILogger logger, IConnectionPoolMetadata pool)
49
49
public bool SupportsPerQueryVariables => ServerVersion . IsMariaDb && ServerVersion . Version >= ServerVersions . MariaDbSupportsPerQueryVariables ;
50
50
public int ActiveCommandId { get ; private set ; }
51
51
public int CancellationTimeout { get ; private set ; }
52
- public string ? ConnectionString { get ; private set ; }
53
52
public int ConnectionId { get ; set ; }
54
53
public byte [ ] ? AuthPluginData { get ; set ; }
55
54
public long CreatedTimestamp { get ; }
@@ -402,16 +401,16 @@ public async Task DisposeAsync(IOBehavior ioBehavior, CancellationToken cancella
402
401
403
402
// set activity tags
404
403
{
405
- ConnectionString = cs . ConnectionStringBuilder . GetConnectionString ( cs . ConnectionStringBuilder . PersistSecurityInfo ) ;
404
+ var connectionString = cs . ConnectionStringBuilder . GetConnectionString ( cs . ConnectionStringBuilder . PersistSecurityInfo ) ;
406
405
m_activityTags . Add ( ActivitySourceHelper . DatabaseSystemTagName , ActivitySourceHelper . DatabaseSystemValue ) ;
407
- m_activityTags . Add ( ActivitySourceHelper . DatabaseConnectionStringTagName , ConnectionString ) ;
406
+ m_activityTags . Add ( ActivitySourceHelper . DatabaseConnectionStringTagName , connectionString ) ;
408
407
m_activityTags . Add ( ActivitySourceHelper . DatabaseUserTagName , cs . UserID ) ;
409
408
if ( cs . Database . Length != 0 )
410
409
m_activityTags . Add ( ActivitySourceHelper . DatabaseNameTagName , cs . Database ) ;
411
410
if ( activity is { IsAllDataRequested : true } )
412
411
{
413
412
activity . SetTag ( ActivitySourceHelper . DatabaseSystemTagName , ActivitySourceHelper . DatabaseSystemValue )
414
- . SetTag ( ActivitySourceHelper . DatabaseConnectionStringTagName , ConnectionString )
413
+ . SetTag ( ActivitySourceHelper . DatabaseConnectionStringTagName , connectionString )
415
414
. SetTag ( ActivitySourceHelper . DatabaseUserTagName , cs . UserID ) ;
416
415
if ( cs . Database . Length != 0 )
417
416
activity . SetTag ( ActivitySourceHelper . DatabaseNameTagName , cs . Database ) ;
0 commit comments