chore: 适配 OTEL EF Core 1.14.0-beta.2

This commit is contained in:
2025-12-02 14:07:03 +08:00
parent bd9a67d776
commit 4935e5390b
6 changed files with 24 additions and 36 deletions

View File

@@ -47,11 +47,7 @@ builder.Services.AddOpenTelemetry()
.SetSampler(new ParentBasedSampler(new AlwaysOnSampler()))
.AddAspNetCoreInstrumentation()
.AddHttpClientInstrumentation()
.AddEntityFrameworkCoreInstrumentation(options =>
{
options.SetDbStatementForText = false;
options.SetDbStatementForStoredProcedure = false;
});
.AddEntityFrameworkCoreInstrumentation();
if (!string.IsNullOrWhiteSpace(otelEndpoint))
{