diff --git a/Examples/otel-dotnet/Program.cs b/Examples/otel-dotnet/Program.cs index 2d6b370ab5..745a026d12 100644 --- a/Examples/otel-dotnet/Program.cs +++ b/Examples/otel-dotnet/Program.cs @@ -28,8 +28,7 @@ builder.Logging.AddOpenTelemetry(logging => .AddConsoleExporter() .AddOtlpExporter(opt => { - - + opt.Protocol = OpenTelemetry.Exporter.OtlpExportProtocol.HttpProtobuf; System.Console.WriteLine($"OTLP Exporter is using {opt.Protocol} protocol and endpoint {opt.Endpoint}"); }); }); @@ -43,7 +42,7 @@ builder.Services.AddOpenTelemetry() .AddConsoleExporter() .AddOtlpExporter(opt => { - + opt.Protocol = OpenTelemetry.Exporter.OtlpExportProtocol.HttpProtobuf; System.Console.WriteLine($"OTLP Exporter is using {opt.Protocol} protocol and endpoint {opt.Endpoint}"); })); @@ -65,8 +64,7 @@ builder.Services.AddOpenTelemetry() }) .AddOtlpExporter(opt => { - - + opt.Protocol = OpenTelemetry.Exporter.OtlpExportProtocol.HttpProtobuf; System.Console.WriteLine($"OTLP Exporter is using {opt.Protocol} protocol and endpoint {opt.Endpoint}"); })); diff --git a/Examples/otel-dotnet/bin/Debug/net6.0/otel-dotnet.dll b/Examples/otel-dotnet/bin/Debug/net6.0/otel-dotnet.dll index 91e729354c..fbb45c68f7 100644 Binary files a/Examples/otel-dotnet/bin/Debug/net6.0/otel-dotnet.dll and b/Examples/otel-dotnet/bin/Debug/net6.0/otel-dotnet.dll differ diff --git a/Examples/otel-dotnet/bin/Debug/net6.0/otel-dotnet.pdb b/Examples/otel-dotnet/bin/Debug/net6.0/otel-dotnet.pdb index fc0453c0cf..995ae84434 100644 Binary files a/Examples/otel-dotnet/bin/Debug/net6.0/otel-dotnet.pdb and b/Examples/otel-dotnet/bin/Debug/net6.0/otel-dotnet.pdb differ diff --git a/Examples/otel-dotnet/obj/Debug/net6.0/otel-dotnet.dll b/Examples/otel-dotnet/obj/Debug/net6.0/otel-dotnet.dll index 91e729354c..fbb45c68f7 100644 Binary files a/Examples/otel-dotnet/obj/Debug/net6.0/otel-dotnet.dll and b/Examples/otel-dotnet/obj/Debug/net6.0/otel-dotnet.dll differ diff --git a/Examples/otel-dotnet/obj/Debug/net6.0/otel-dotnet.pdb b/Examples/otel-dotnet/obj/Debug/net6.0/otel-dotnet.pdb index fc0453c0cf..995ae84434 100644 Binary files a/Examples/otel-dotnet/obj/Debug/net6.0/otel-dotnet.pdb and b/Examples/otel-dotnet/obj/Debug/net6.0/otel-dotnet.pdb differ diff --git a/Examples/otel-dotnet/obj/staticwebassets.pack.sentinel b/Examples/otel-dotnet/obj/staticwebassets.pack.sentinel index 0927a334ea..a91dbe7a17 100644 --- a/Examples/otel-dotnet/obj/staticwebassets.pack.sentinel +++ b/Examples/otel-dotnet/obj/staticwebassets.pack.sentinel @@ -46,3 +46,6 @@ 2.0 2.0 2.0 +2.0 +2.0 +2.0 diff --git a/Nginx/default.conf.template b/Nginx/default.conf.template index 81b2717828..2ed844dc9f 100644 --- a/Nginx/default.conf.template +++ b/Nginx/default.conf.template @@ -325,8 +325,20 @@ server { proxy_pass http://accounts; } - location /opentelemetry-collector { - grpc_pass grpc://${SERVER_OTEL_COLLECTOR_HOSTNAME}:${OTEL_COLLECTOR_GRPC_PORT}; + location /opentelemetry-collector/ { + + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + + # enable WebSockets (for ws://sockjs not connected error in the accounts source: https://stackoverflow.com/questions/41381444/websocket-connection-failed-error-during-websocket-handshake-unexpected-respon) + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + + + proxy_pass http://opentelemetry-collector/; } location /notification {