Skip to content

Commit

Permalink
fix: fix errors (#356)
Browse files Browse the repository at this point in the history
  • Loading branch information
Qinyouzeng authored Sep 2, 2024
1 parent 6df0f72 commit 920e492
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 71 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,8 @@
<ProjectReference Include="..\..\Infrastructure\Masa.Alert.Infrastructure.Middleware\Masa.Alert.Infrastructure.Middleware.csproj" />
<ProjectReference Include="..\..\Infrastructure\Masa.Alert.NotificationService.Provider.Mc\Masa.Alert.NotificationService.Provider.Mc.csproj" />
</ItemGroup>

<ItemGroup>
<Folder Include="Extensions\" />
</ItemGroup>
</Project>
21 changes: 8 additions & 13 deletions src/Services/Masa.Alert.Service/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,15 @@
await builder.Services.AddMasaStackConfigAsync(MasaStackProject.Alert, MasaStackApp.Service);
var masaStackConfig = builder.Services.GetMasaStackConfig();

builder.Services.AddAlertObservable(builder.Logging, () =>
builder.Services.AddObservable(builder.Logging, new MasaObservableOptions
{
return new MasaObservableOptions
{
ServiceNameSpace = builder.Environment.EnvironmentName,
ServiceVersion = masaStackConfig.Version,
ServiceName = masaStackConfig.GetServiceId(MasaStackProject.Alert),
Layer = masaStackConfig.Namespace,
ServiceInstanceId = builder.Configuration.GetValue<string>("HOSTNAME")
};
}, () =>
{
return masaStackConfig.OtlpUrl;
});
ServiceNameSpace = builder.Environment.EnvironmentName,
ServiceVersion = masaStackConfig.Version,
ServiceName = masaStackConfig.GetServiceId(MasaStackProject.Alert),
Layer = masaStackConfig.Namespace,
ServiceInstanceId = builder.Configuration.GetValue<string>("HOSTNAME")!
}
, masaStackConfig.OtlpUrl, activitySources: new string[] { CheckAlarmRuleJob.ActivitySource.Name });

builder.Services.AddDaprClient();
var identityServerUrl = masaStackConfig.GetSsoDomain();
Expand Down
2 changes: 1 addition & 1 deletion src/Services/Masa.Alert.Service/_Imports.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
global using Masa.BuildingBlocks.Extensions.BackgroundJobs;
global using Masa.BuildingBlocks.RulesEngine;
global using Masa.BuildingBlocks.StackSdks.Auth.Contracts;
global using Masa.BuildingBlocks.StackSdks.Auth.Contracts.Consts;
global using Masa.BuildingBlocks.StackSdks.Config.Consts;
global using Masa.Contrib.Caching.Distributed.StackExchangeRedis;
global using Masa.Contrib.Configuration.ConfigurationApi.Dcc;
global using Masa.Contrib.Dispatcher.IntegrationEvents.EventLogs.EFCore;
Expand Down

0 comments on commit 920e492

Please sign in to comment.