feat: metrics test.
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
using Godot;
|
||||
using GodotHostTest.AetherBind;
|
||||
using GodotHostTest.Game.Level;
|
||||
using GodotHostTest.Game.Metrics;
|
||||
using GodotHostTest.Game.Score;
|
||||
using GodotHostTest.Game.Target;
|
||||
using GodotHostTest.Interfaces;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using OwofGames.GodotHost;
|
||||
using OwofGames.GodotHost.Observability;
|
||||
using OwofGames.GodotLume;
|
||||
|
||||
@@ -23,12 +25,16 @@ public partial class GameServiceSource : RootServiceSource
|
||||
// current level / level data management
|
||||
.AddInstance<ILevelDataProvider, LevelsData>(_levelsData)
|
||||
.AddSingleton<ICurrentLevel, CurrentLevel>()
|
||||
// metrics
|
||||
.AddSingleton<IHostLifetime, MetricsHandler>()
|
||||
// level scope services
|
||||
.AddLevelServices();
|
||||
}
|
||||
|
||||
protected override void ConfigureServices(IServiceCollection serviceCollection)
|
||||
{
|
||||
serviceCollection.AddObservability(builder => builder.AddGrpcExporter("http://localhost:4317"));
|
||||
serviceCollection.AddObservability(builder => builder
|
||||
.AddGrpcExporter("http://localhost:4317")
|
||||
.AddMeterName(MetricsHandler.MeterName));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user