mirror of
https://github.com/nsnail/Ocelot.git
synced 2025-06-19 19:38:16 +08:00
tweaks
This commit is contained in:
@ -1,23 +1,22 @@
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using System.IO;
|
||||
using Ocelot.DependencyInjection;
|
||||
using Ocelot.Middleware;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Ocelot.Tracing.OpenTracing;
|
||||
using Jaeger;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using OpenTracing;
|
||||
using OpenTracing.Util;
|
||||
|
||||
namespace OcelotOpenTracing
|
||||
namespace OcelotOpenTracing
|
||||
{
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using System.IO;
|
||||
using Ocelot.DependencyInjection;
|
||||
using Ocelot.Middleware;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Ocelot.Tracing.OpenTracing;
|
||||
using Jaeger;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using OpenTracing;
|
||||
using OpenTracing.Util;
|
||||
|
||||
internal static class Program
|
||||
{
|
||||
private static void Main(string[] args)
|
||||
{
|
||||
|
||||
Host.CreateDefaultBuilder()
|
||||
.ConfigureWebHostDefaults(webBuilder =>
|
||||
{
|
||||
@ -36,10 +35,6 @@ namespace OcelotOpenTracing
|
||||
})
|
||||
.ConfigureServices((context, services) =>
|
||||
{
|
||||
services
|
||||
.AddOcelot()
|
||||
.AddOpenTracing();
|
||||
|
||||
services.AddSingleton<ITracer>(sp =>
|
||||
{
|
||||
var loggerFactory = sp.GetService<ILoggerFactory>();
|
||||
@ -50,6 +45,9 @@ namespace OcelotOpenTracing
|
||||
return tracer;
|
||||
});
|
||||
|
||||
services
|
||||
.AddOcelot()
|
||||
.AddOpenTracing();
|
||||
})
|
||||
.ConfigureLogging(logging =>
|
||||
{
|
||||
|
Reference in New Issue
Block a user