Skip to content
Permalink
Browse files

Fixed middleware

  • Loading branch information...
spetz committed Nov 3, 2019
1 parent 844300b commit 845d3dcf3f49e22ad565d744be7e3dfd67908e80
@@ -34,7 +34,8 @@ public static void AddJwt(this IServiceCollection services)
ValidIssuer = options.Issuer,
ValidAudience = options.ValidAudience,
ValidateAudience = options.ValidateAudience,
ValidateLifetime = options.ValidateLifetime
ValidateLifetime = options.ValidateLifetime,
ClockSkew = TimeSpan.Zero
};
});
}
@@ -22,7 +22,7 @@ public JaegerStagedMiddleware(ITracer tracer)
public override string StageMarker => RawRabbit.Pipe.StageMarker.MessageDeserialized;


public override Task InvokeAsync(IPipeContext context, CancellationToken token = new CancellationToken())
public override async Task InvokeAsync(IPipeContext context, CancellationToken token = new CancellationToken())
{
var correlationContext = (ICorrelationContext) context.GetMessageContext();
var messageType = context.GetMessageType();
@@ -34,16 +34,14 @@ public override Task InvokeAsync(IPipeContext context, CancellationToken token =

try
{
return Next.InvokeAsync(context, token);
await Next.InvokeAsync(context, token);
}
catch(Exception ex)
{
span.SetTag(Tags.Error, true);
span.Log(ex.Message);
}
}

return Next.Next.InvokeAsync(context, token);
}

private IScope BuildScope(Type messageType, string serializedSpanContext)

0 comments on commit 845d3dc

Please sign in to comment.
You can’t perform that action at this time.