OP changes
This commit is contained in:
		| @@ -10,6 +10,7 @@ | ||||
|     <PackageReference Include="Elastic.Apm.NetCoreAll" Version="1.11.1" /> | ||||
|     <PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.1.16" /> | ||||
|     <PackageReference Include="Newtonsoft.Json" Version="13.0.1" /> | ||||
|     <PackageReference Include="OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore" Version="1.0.0-beta2" /> | ||||
|     <PackageReference Include="OpenTelemetry.Exporter.Console" Version="1.1.0" /> | ||||
|     <PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.1.0" /> | ||||
|     <PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.0.0-rc7" /> | ||||
|   | ||||
| @@ -52,8 +52,10 @@ namespace FwSearchApi | ||||
|             services.AddSwaggerGen(); | ||||
|  | ||||
|             services.AddOpenTelemetryTracing((builder) => builder | ||||
|                         //.SetResourceBuilder(ResourceBuilder.CreateDefault().AddService("TxSearchApi")) | ||||
|                         .AddAspNetCoreInstrumentation() | ||||
|                         .AddHttpClientInstrumentation() | ||||
|                         .AddEntityFrameworkCoreInstrumentation() | ||||
|                         .AddConsoleExporter() | ||||
|                         .AddOtlpExporter(otlpOptions => { | ||||
|                             otlpOptions.Endpoint = new Uri("http://192.168.178.44:8200"); | ||||
| @@ -73,7 +75,7 @@ namespace FwSearchApi | ||||
|  | ||||
|             app.UseSwagger(); | ||||
|  | ||||
|             app.UseElasticApm(_configuration, new EfCoreDiagnosticsSubscriber()); | ||||
|             //app.UseElasticApm(_configuration, new EfCoreDiagnosticsSubscriber()); | ||||
|  | ||||
|             app.UseSwaggerUI(c => | ||||
|             { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user