Skip to content

Is it possible to get command text instrumentation using System.Data? #2981

@carl-berg

Description

@carl-berg

I have a test project targeting net472, using services.AddApplicationInsightsTelemetryWorkerService, with this configuration:

services.ConfigureTelemetryModule<DependencyTrackingTelemetryModule>((module, o) => 
{ 
    module.EnableSqlCommandTextInstrumentation = true;
});

If i switch to Microsoft.Data.SqlClient the text instrumentation works, but when i use System.Data from the framework it does not. I tried adding the System.Data.SqlClient -package, but i only seem to be able to reference the classes in System.Data from the framework, not the nuget-package...
Is there a way to get command text instrumentation for a System.Data SqlConnection?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions