Debugging Endpoint

In case you want to see the current definitions of the flags or recorded metrics, usage stats, you can use the IMetricsDebug, IUsageStatsDebug or IFeatureProviderDebug

app.MapGet("/feature-debug", async ctx => await ctx.Response.WriteAsJsonAsync(new
{
    Metrics = ctx.RequestServices.GetRequiredService<IMetricsDebug>().GetDebugInfo(),
    UsageStats = ctx.RequestServices.GetRequiredService<IUsageStatsDebug>().GetDebugInfo(),
    FeatureProvider = ctx.RequestServices.GetRequiredService<IFeatureProviderDebug>().GetDebugInfo(),
}));

Last updated