owin adapter
Closed this issue · 2 comments
HI, looking at this sample there is the option to change owin endpoint routes: https://github.com/Recognos/Metrics.NET/wiki/OWIN-Metrics-Adapter
Metric.Config
.WithOwin(middleware => app.Use(middleware), config => config
.WithMetricsEndpoint(endpointConfig =>
{
endpointConfig
.MetricsHealthEndpoint(endpoint: "new-healthcheck-endpoint")
.MetricsPingEndpoint(endpoint: "new-ping-endpoint")
.MetricsJsonEndpoint(endpoint: "new-json-endpoint")
.MetricsTextEndpoint(enabled: false)
.MetricsEndpoint(enabled: false);
})
);
but i cant find an api such as .MetricsJsonEndpoint();
i've made a search in the source code and it is not even present.
am i missing something?
thanks
Those methods were removed in version 0.4.3-pre I believe, when support for endpoint reports was added and the documentation was not updated, thanks for pointing this out.
Endpoint configuration is now done everywhere through the MetricsEndpointReports
class, and the current API registers a set of reports at default endpoints (e.g. /text, /json, /health etc.). You cannot remove these endpoints, but you can override them (by configuring another report at the same endpoint - WithEndpointReport
) or you can configure the default reports at new endpoints by using the built-in extension methods (WithTextReport
, WithJsonReport
etc.)
ok, thanks!