Skip to content

SQL query logs can't be enabled #211

@mahdiprog

Description

@mahdiprog

According to Microsoft documentation, after SDK version 2.14.0, in order to send SQL query logs to App Insights, we need to add the following code snippet:

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

Description
I couldn't find any place for enabling it in Serilog sink

Reproduction

  1. Use AppInsights sink
  2. Execute any SQL query
  3. It won't be shown in Azure

Expected behavior
There should be a way to enable it. within code and via appsettings

Relevant package, tooling and runtime versions
Serilog.Sinks.ApplicationInsights V4.0.0

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions