mirror of
				https://github.com/nsnail/Ocelot.git
				synced 2025-11-04 20:10:50 +08:00 
			
		
		
		
	Fix tracing wrapper. (#966)
This commit is contained in:
		
				
					committed by
					
						
						Thiago Loureiro
					
				
			
			
				
	
			
			
			
						parent
						
							176a7bb960
						
					
				
				
					commit
					ad00f20a23
				
			@@ -79,12 +79,12 @@ namespace Ocelot.Middleware.Pipeline
 | 
				
			|||||||
                    var diagnosticListener = (DiagnosticListener)app.ApplicationServices.GetService(typeof(DiagnosticListener));
 | 
					                    var diagnosticListener = (DiagnosticListener)app.ApplicationServices.GetService(typeof(DiagnosticListener));
 | 
				
			||||||
                    var middlewareName = ocelotDelegate.Target.GetType().Name;
 | 
					                    var middlewareName = ocelotDelegate.Target.GetType().Name;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    OcelotRequestDelegate wrapped = context =>
 | 
					                    OcelotRequestDelegate wrapped = async context =>
 | 
				
			||||||
                    {
 | 
					                    {
 | 
				
			||||||
                        try
 | 
					                        try
 | 
				
			||||||
                        {
 | 
					                        {
 | 
				
			||||||
                            Write(diagnosticListener, "Ocelot.MiddlewareStarted", middlewareName, context);
 | 
					                            Write(diagnosticListener, "Ocelot.MiddlewareStarted", middlewareName, context);
 | 
				
			||||||
                            return ocelotDelegate(context);
 | 
					                            await ocelotDelegate(context);
 | 
				
			||||||
                        }
 | 
					                        }
 | 
				
			||||||
                        catch (Exception ex)
 | 
					                        catch (Exception ex)
 | 
				
			||||||
                        {
 | 
					                        {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user