Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
ZOXEXIVO committed Feb 10, 2023
1 parent bfdb98d commit 08f7c85
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 34 deletions.
2 changes: 1 addition & 1 deletion src/Backend/Geen.Data/Geen.Data.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Options" Version="7.0.0" />
<PackageReference Include="MongoDB.Driver" Version="2.18.0" />
<PackageReference Include="StackExchange.Redis" Version="2.6.80" />
<PackageReference Include="StackExchange.Redis" Version="2.6.90" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.0" />
</ItemGroup>
<ItemGroup>
Expand Down
12 changes: 3 additions & 9 deletions src/Backend/Geen.Web/Geen.Web.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,9 @@
<TargetFramework>net7.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="OpenTelemetry.Exporter.Jaeger" Version="1.3.1" />
<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.0.0-rc9.9" />
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.0.0-rc9.9" />
<PackageReference Include="OpenTelemetry.Instrumentation.GrpcNetClient" Version="1.0.0-rc9.9" />
<PackageReference Include="OpenTelemetry.Instrumentation.Http" Version="1.0.0-rc9.9" />
<PackageReference Include="OpenTelemetry.Instrumentation.Runtime" Version="1.1.0-beta.1" />
<PackageReference Include="Swashbuckle.AspNetCore.Swagger" Version="6.4.0" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerGen" Version="6.4.0" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="6.4.0" />
<PackageReference Include="Swashbuckle.AspNetCore.Swagger" Version="6.5.0" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerGen" Version="6.5.0" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="6.5.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Geen.Core\Geen.Core.csproj" />
Expand Down
25 changes: 1 addition & 24 deletions src/Backend/Geen.Web/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Microsoft.OpenApi.Models;
using OpenTelemetry.Exporter;
using OpenTelemetry.Logs;
using OpenTelemetry.Metrics;
using OpenTelemetry.Resources;
using OpenTelemetry.Trace;

namespace Geen.Web
{
Expand Down Expand Up @@ -52,24 +47,6 @@ public void ConfigureServices(IServiceCollection services)
"application/x-font-ttf"
};
});

services.AddOpenTelemetryTracing(builder =>
{
builder.SetSampler(new AlwaysOnSampler())
.ConfigureResource(r => r.AddService(
serviceName: "Geen.Web",
serviceInstanceId: Environment.MachineName))
.AddHttpClientInstrumentation()
.AddAspNetCoreInstrumentation();

var uri = new Uri(settings.Tracing.Jaeger.Endpoint);

builder.AddJaegerExporter(exporter =>
{
exporter.AgentHost = uri.Host;
exporter.Endpoint = uri;
});
});

services.AddCors(options =>
{
Expand Down Expand Up @@ -131,7 +108,7 @@ public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory)
app.UseRouting();
app.UseEndpoints(routes =>
{
routes.MapAreaControllerRoute("areaRoute", "areaRoute", "api/{area:exists}/{controller}/{action}/{id?}");
routes.MapAreaControllerRoute("areaRoute", "Admin", "api/{area:exists}/{controller}/{action}/{id?}");
routes.MapControllerRoute("default","{controller=Home}/{action=Index}/{id?}");

routes.MapFallbackToFile("index.html");
Expand Down

0 comments on commit 08f7c85

Please sign in to comment.