From e32e2c15c4ea4cc6c11d1031eb987be510c2fdee Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=86=9B?= <2357729423@qq.com>
Date: Tue, 25 Jun 2024 17:43:17 +0800
Subject: [PATCH] =?UTF-8?q?1.=E5=8D=87=E7=BA=A7=E7=94=A8=E6=88=B7=E4=B8=AD?=
=?UTF-8?q?=E5=BF=83=E5=8C=85=202.=E5=8A=A0=E5=85=A5otlp?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/SJZY.Track.Api/Program.cs | 2 ++
src/SJZY.Track.Application/SJZY.Track.Application.csproj | 2 +-
.../Aggregates/OrderAggregate/OrderFlightEntity.cs | 2 +-
.../Aggregates/OrderAggregate/OrderLinkEntity.cs | 2 +-
.../Aggregates/OrderAggregate/OrderTemplateEntity.cs | 2 +-
src/SJZY.Track.Domain/SJZY.Track.Domain.csproj | 2 +-
src/SJZY.Track.Repository/SJZY.Track.Repository.csproj | 3 ++-
7 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/src/SJZY.Track.Api/Program.cs b/src/SJZY.Track.Api/Program.cs
index db266046..b1ac2cbf 100644
--- a/src/SJZY.Track.Api/Program.cs
+++ b/src/SJZY.Track.Api/Program.cs
@@ -10,6 +10,7 @@ try
.AddConfigurationContainer()
.AddOptionsFromConfiguration()
.UseSerilogDefault()
+ .AddOTel() //注入OTel
.Host.AddAppSettingsSecretsJson()
.UseAutofac();
@@ -17,6 +18,7 @@ try
var app = builder.Build();
await app.InitializeApplicationAsync();
+ app.UseOTel(); //启动WebApi的请求管道配置
await app.RunAsync();
}
catch (Exception ex)
diff --git a/src/SJZY.Track.Application/SJZY.Track.Application.csproj b/src/SJZY.Track.Application/SJZY.Track.Application.csproj
index 99912fb3..7d3d8cee 100644
--- a/src/SJZY.Track.Application/SJZY.Track.Application.csproj
+++ b/src/SJZY.Track.Application/SJZY.Track.Application.csproj
@@ -15,7 +15,7 @@
-
+
diff --git a/src/SJZY.Track.Domain/Aggregates/OrderAggregate/OrderFlightEntity.cs b/src/SJZY.Track.Domain/Aggregates/OrderAggregate/OrderFlightEntity.cs
index 4e5f2017..1ba0393a 100644
--- a/src/SJZY.Track.Domain/Aggregates/OrderAggregate/OrderFlightEntity.cs
+++ b/src/SJZY.Track.Domain/Aggregates/OrderAggregate/OrderFlightEntity.cs
@@ -40,7 +40,7 @@ public class OrderFlightEntity : ICreateBaicEntity, ISoftDeleteBasicEntity, IEnt
/// 创建时间
///
[SugarColumn(ColumnName = "CreateTime")]
- public DateTime? CreateTime { get; set; }
+ public DateTime CreateTime { get; set; }
///
/// 是否删除
diff --git a/src/SJZY.Track.Domain/Aggregates/OrderAggregate/OrderLinkEntity.cs b/src/SJZY.Track.Domain/Aggregates/OrderAggregate/OrderLinkEntity.cs
index 71231e99..612cdae2 100644
--- a/src/SJZY.Track.Domain/Aggregates/OrderAggregate/OrderLinkEntity.cs
+++ b/src/SJZY.Track.Domain/Aggregates/OrderAggregate/OrderLinkEntity.cs
@@ -59,7 +59,7 @@ public class OrderLinkEntity : ICreateBaicEntity, ISoftDeleteBasicEntity, IEntit
/// 创建时间
///
[SugarColumn(ColumnName = "CreateTime")]
- public DateTime? CreateTime { get; set; }
+ public DateTime CreateTime { get; set; }
///
/// 是否删除
diff --git a/src/SJZY.Track.Domain/Aggregates/OrderAggregate/OrderTemplateEntity.cs b/src/SJZY.Track.Domain/Aggregates/OrderAggregate/OrderTemplateEntity.cs
index 88559ae6..7dee5516 100644
--- a/src/SJZY.Track.Domain/Aggregates/OrderAggregate/OrderTemplateEntity.cs
+++ b/src/SJZY.Track.Domain/Aggregates/OrderAggregate/OrderTemplateEntity.cs
@@ -40,7 +40,7 @@ public class OrderTemplateEntity : ICreateBaicEntity, ISoftDeleteBasicEntity, IE
/// 创建时间
///
[SugarColumn(ColumnName = "CreateTime")]
- public DateTime? CreateTime { get; set; }
+ public DateTime CreateTime { get; set; }
///
/// 是否删除
diff --git a/src/SJZY.Track.Domain/SJZY.Track.Domain.csproj b/src/SJZY.Track.Domain/SJZY.Track.Domain.csproj
index cb0a715f..d086d460 100644
--- a/src/SJZY.Track.Domain/SJZY.Track.Domain.csproj
+++ b/src/SJZY.Track.Domain/SJZY.Track.Domain.csproj
@@ -8,7 +8,7 @@
-
+
diff --git a/src/SJZY.Track.Repository/SJZY.Track.Repository.csproj b/src/SJZY.Track.Repository/SJZY.Track.Repository.csproj
index b2285e0b..5fb248b6 100644
--- a/src/SJZY.Track.Repository/SJZY.Track.Repository.csproj
+++ b/src/SJZY.Track.Repository/SJZY.Track.Repository.csproj
@@ -8,8 +8,9 @@
+
-
+