Skip to content

opentelemetry sqltelemetry not showing db but only applications .net8" #3120

@feiliu-Docu

Description

@feiliu-Docu

Hi team,

we saw some logs has application name with or without db name.
using OpenTelemetry.Trace;

// ...

builder.Services.AddOpenTelemetry()
.WithTracing(tracerProviderBuilder => tracerProviderBuilder
.AddSource(MySource.Name)
.AddSqlClientInstrumentation(options =>
{
// Optional: Include the SQL statement in the span attributes
options.SetDbStatementForText = true;
})

what's the possible cause and fix for this ?

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