opentelemetry-dotnet-contrib
opentelemetry-dotnet-contrib copied to clipboard
[bug] db statements are not being saved when enabled
Package
OpenTelemetry
Package Version
| Package Name | Version |
|---|---|
| OpenTelemetry.Instrumentation.SqlClient | 1.9.0-beta.1 |
| OpenTelemetry.Exporter.OpenTelemetryProtocol | 1.4.0-beta.3 |
Runtime Version
net8.0
Description
I'm activating the SqlClient instrumentation with the following code:
builder.AddSqlClientInstrumentation(options =>
{
options.EnableConnectionLevelAttributes = true;
options.RecordException = true;
options.SetDbStatementForText = true;
});
But only the db.name, db.system and peer.service tags are being exported.
Steps to Reproduce
as above
Expected Result
should add missing tags
Actual Result
Additional Context
No response
What tags specifically are you looking for? The Database specification isn't stable yet. https://github.com/open-telemetry/semantic-conventions/blob/main/docs/database/database-spans.md
The OpenTelemetry.Instrumentation.SqlClient library will need a large update after this spec is stabilized.
@lucasoares, it will be great to have Minimal, Reproducible Example. Including your exact Sql Client version.
What tags specifically are you looking for? The Database specification isn't stable yet. https://github.com/open-telemetry/semantic-conventions/blob/main/docs/database/database-spans.md
The OpenTelemetry.Instrumentation.SqlClient library will need a large update after this spec is stabilized.
The db statements tags
Same case,I hava CommandText from eventsource,but no value , so no db.statement tag, .net48 (old project...
@Robert-Chan, I will repeat. it will be great to have Minimal, Reproducible Example. Including your exact Sql Client version to debug/determine what is the root cause.
I am closing this. Feel free to reopen/comment/create new issue when you provide exact steps to reproduce.