From 4935e5390b27153071e0d8fac7e9f9eb6c52c49d Mon Sep 17 00:00:00 2001 From: MSuMshk <2039814060@qq.com> Date: Tue, 2 Dec 2025 14:07:03 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E9=80=82=E9=85=8D=20OTEL=20EF=20Core?= =?UTF-8?q?=201.14.0-beta.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Api/TakeoutSaaS.AdminApi/Program.cs | 6 +----- .../TakeoutSaaS.AdminApi.csproj | 14 +++++++------- src/Api/TakeoutSaaS.MiniApi/Program.cs | 6 +----- .../TakeoutSaaS.MiniApi/TakeoutSaaS.MiniApi.csproj | 14 +++++++------- src/Api/TakeoutSaaS.UserApi/Program.cs | 6 +----- .../TakeoutSaaS.UserApi/TakeoutSaaS.UserApi.csproj | 14 +++++++------- 6 files changed, 24 insertions(+), 36 deletions(-) diff --git a/src/Api/TakeoutSaaS.AdminApi/Program.cs b/src/Api/TakeoutSaaS.AdminApi/Program.cs index e9619a0..245188d 100644 --- a/src/Api/TakeoutSaaS.AdminApi/Program.cs +++ b/src/Api/TakeoutSaaS.AdminApi/Program.cs @@ -82,11 +82,7 @@ builder.Services.AddOpenTelemetry() .SetSampler(new ParentBasedSampler(new AlwaysOnSampler())) .AddAspNetCoreInstrumentation() .AddHttpClientInstrumentation() - .AddEntityFrameworkCoreInstrumentation(options => - { - options.SetDbStatementForText = false; - options.SetDbStatementForStoredProcedure = false; - }); + .AddEntityFrameworkCoreInstrumentation(); if (!string.IsNullOrWhiteSpace(otelEndpoint)) { diff --git a/src/Api/TakeoutSaaS.AdminApi/TakeoutSaaS.AdminApi.csproj b/src/Api/TakeoutSaaS.AdminApi/TakeoutSaaS.AdminApi.csproj index 810c4b7..e773c1f 100644 --- a/src/Api/TakeoutSaaS.AdminApi/TakeoutSaaS.AdminApi.csproj +++ b/src/Api/TakeoutSaaS.AdminApi/TakeoutSaaS.AdminApi.csproj @@ -8,13 +8,13 @@ - - - - - - - + + + + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Api/TakeoutSaaS.MiniApi/Program.cs b/src/Api/TakeoutSaaS.MiniApi/Program.cs index 2c44874..e99e957 100644 --- a/src/Api/TakeoutSaaS.MiniApi/Program.cs +++ b/src/Api/TakeoutSaaS.MiniApi/Program.cs @@ -59,11 +59,7 @@ builder.Services.AddOpenTelemetry() .SetSampler(new ParentBasedSampler(new AlwaysOnSampler())) .AddAspNetCoreInstrumentation() .AddHttpClientInstrumentation() - .AddEntityFrameworkCoreInstrumentation(options => - { - options.SetDbStatementForText = false; - options.SetDbStatementForStoredProcedure = false; - }); + .AddEntityFrameworkCoreInstrumentation(); if (!string.IsNullOrWhiteSpace(otelEndpoint)) { diff --git a/src/Api/TakeoutSaaS.MiniApi/TakeoutSaaS.MiniApi.csproj b/src/Api/TakeoutSaaS.MiniApi/TakeoutSaaS.MiniApi.csproj index a5ca222..fd1fba4 100644 --- a/src/Api/TakeoutSaaS.MiniApi/TakeoutSaaS.MiniApi.csproj +++ b/src/Api/TakeoutSaaS.MiniApi/TakeoutSaaS.MiniApi.csproj @@ -9,13 +9,13 @@ - - - - - - - + + + + + + + diff --git a/src/Api/TakeoutSaaS.UserApi/Program.cs b/src/Api/TakeoutSaaS.UserApi/Program.cs index e8d458b..09eed33 100644 --- a/src/Api/TakeoutSaaS.UserApi/Program.cs +++ b/src/Api/TakeoutSaaS.UserApi/Program.cs @@ -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)) { diff --git a/src/Api/TakeoutSaaS.UserApi/TakeoutSaaS.UserApi.csproj b/src/Api/TakeoutSaaS.UserApi/TakeoutSaaS.UserApi.csproj index 247af3e..9500251 100644 --- a/src/Api/TakeoutSaaS.UserApi/TakeoutSaaS.UserApi.csproj +++ b/src/Api/TakeoutSaaS.UserApi/TakeoutSaaS.UserApi.csproj @@ -8,13 +8,13 @@ - - - - - - - + + + + + + +