Skip to content

Commit

Permalink
sqlclient: remove duplicate db.system settag
Browse files Browse the repository at this point in the history
  • Loading branch information
johnduhart committed Apr 14, 2021
1 parent 97e8a6c commit 6ebad82
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ public override void OnCustom(string name, Activity activity, object payload)
_ = this.dataSourceFetcher.TryFetch(connection, out var dataSource);
_ = this.commandTextFetcher.TryFetch(command, out var commandText);

activity.SetTag(SemanticConventions.AttributeDbSystem, SqlActivitySourceHelper.MicrosoftSqlServerDatabaseSystemName);
activity.SetTag(SemanticConventions.AttributeDbName, (string)database);

this.options.AddConnectionLevelDetailsToActivity((string)dataSource, activity);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ private void OnBeginExecute(EventWrittenEventArgs eventData)

if (activity.IsAllDataRequested)
{
activity.SetTag(SemanticConventions.AttributeDbSystem, SqlActivitySourceHelper.MicrosoftSqlServerDatabaseSystemName);
activity.SetTag(SemanticConventions.AttributeDbName, databaseName);

this.options.AddConnectionLevelDetailsToActivity((string)eventData.Payload[1], activity);
Expand Down

0 comments on commit 6ebad82

Please sign in to comment.