mirror of
https://github.com/ckaczor/HomeMonitor.git
synced 2026-01-13 17:22:54 -05:00
Add OpenTelemetry to Environment service
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
using ChrisKaczor.Common.OpenTelemetry;
|
||||
using ChrisKaczor.HomeMonitor.Environment.Service.Data;
|
||||
using System.Reflection;
|
||||
|
||||
namespace ChrisKaczor.HomeMonitor.Environment.Service;
|
||||
|
||||
@@ -10,6 +12,8 @@ public static class Program
|
||||
|
||||
builder.Configuration.AddEnvironmentVariables();
|
||||
|
||||
builder.Services.AddCommonOpenTelemetry(Assembly.GetExecutingAssembly().GetName().Name, builder.Configuration["Telemetry:Endpoint"], nameof(MessageHandler));
|
||||
|
||||
builder.Services.AddControllers();
|
||||
|
||||
builder.Services.AddTransient<Database>();
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="ChrisKaczor.Common.OpenTelemetry" Version="1.0.1" />
|
||||
<PackageReference Include="Dapper" Version="2.1.28" />
|
||||
<PackageReference Include="dbup-sqlserver" Version="5.0.37" />
|
||||
<PackageReference Include="JetBrains.Annotations" Version="2023.3.0" />
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
"Default": "Warning",
|
||||
"Microsoft": "Information"
|
||||
}
|
||||
},
|
||||
"AllowedHosts": "*",
|
||||
@@ -22,5 +22,8 @@
|
||||
"Hub": {
|
||||
"Url": "http://hub-server/environment"
|
||||
}
|
||||
},
|
||||
"Telemetry": {
|
||||
"Endpoint": "http://signoz-otel-collector.platform:4317/"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user