Skip to content

Instantly share code, notes, and snippets.

@thiagoloureiro
Created March 19, 2018 21:36
Show Gist options
  • Save thiagoloureiro/55678f27a80b0e778e49546af92ae736 to your computer and use it in GitHub Desktop.
Save thiagoloureiro/55678f27a80b0e778e49546af92ae736 to your computer and use it in GitHub Desktop.
public void ConfigureServices(IServiceCollection services)
{
services.AddMvc();
services.AddHystrix();
services.Configure<HystrixOptions>(options => Configuration.GetSection("Hystrix").Bind(options));
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
app.UseMvc();
app.UseHystrixMetricsEndpoint("hystrix.stream");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment