Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/OpenTelemetry.Instrumentation.SqlClient/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
* **Breaking Change**: Renamed `SqlClientInstrumentationOptions` to
`SqlClientTraceInstrumentationOptions`.
([#5285](https://github.com/open-telemetry/opentelemetry-dotnet/pull/5285))
* **Breaking Change**: Stop emitting `db.statement_type` attribute.
([#5301](https://github.com/open-telemetry/opentelemetry-dotnet/pull/5301))

## 1.6.0-beta.3

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ public override void OnEventWritten(string name, object payload)
switch (commandType)
{
case CommandType.StoredProcedure:
activity.SetTag(SpanAttributeConstants.DatabaseStatementTypeKey, nameof(CommandType.StoredProcedure));
if (this.options.SetDbStatementForStoredProcedure)
{
activity.SetTag(SemanticConventions.AttributeDbStatement, (string)commandText);
Expand All @@ -117,7 +116,6 @@ public override void OnEventWritten(string name, object payload)
break;

case CommandType.Text:
activity.SetTag(SpanAttributeConstants.DatabaseStatementTypeKey, nameof(CommandType.Text));
if (this.options.SetDbStatementForText)
{
activity.SetTag(SemanticConventions.AttributeDbStatement, (string)commandText);
Expand All @@ -126,7 +124,6 @@ public override void OnEventWritten(string name, object payload)
break;

case CommandType.TableDirect:
activity.SetTag(SpanAttributeConstants.DatabaseStatementTypeKey, nameof(CommandType.TableDirect));
break;
}
}
Expand Down
1 change: 0 additions & 1 deletion src/Shared/SpanAttributeConstants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,4 @@ internal static class SpanAttributeConstants
{
public const string StatusCodeKey = "otel.status_code";
public const string StatusDescriptionKey = "otel.status_description";
public const string DatabaseStatementTypeKey = "db.statement_type";
}
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,6 @@ private static void VerifyActivityData(

Assert.Equal("master", activity.GetTagValue(SemanticConventions.AttributeDbName));

// "db.statement_type" is never set by the SqlEventSource instrumentation
Assert.Null(activity.GetTagValue(SpanAttributeConstants.DatabaseStatementTypeKey));
if (captureText)
{
Assert.Equal(commandText, activity.GetTagValue(SemanticConventions.AttributeDbStatement));
Expand Down