Skip to content

[bug] db statements are not being saved when enabled #2157

Closed as not planned
Closed as not planned
@lucasoares

Description

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

image

Additional Context

No response

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcomp:instrumentation.sqlclientThings related to OpenTelemetry.Instrumentation.SqlClientneeds-triageNew issues which have not been classified or triaged by a community member

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions