Skip to content

Visualisation doesn't work when Health and JSON endpoints are moved. #127

Description

@JoelHT-Landmark

I want to move the paths for the endpoints to deconflict with other aspects of our web application...

What I've got is

public class WebApp
    {
        public void Configuration(IAppBuilder app)
        {
            Metric.Config
                .WithOwin(middleware => app.Use(middleware), config => config
                    .WithMetricsEndpoint(endpointConfig =>
                    {
                        endpointConfig
                            .MetricsHealthEndpoint(endpoint: "health/json", enabled: true)
                            .MetricsPingEndpoint(endpoint: "health/ping")
                            .MetricsJsonEndpoint(endpoint: "diagnostics/json")
                            .MetricsTextEndpoint(endpoint: "diagnostics/text", enabled:true)
                            .MetricsEndpoint(endpoint: "diagnostics", enabled: true);
                    })
                );
        }
    }

However, whilst the Flot Visualisation is correctly available at /diagnostics, the embedded HTML has not been amended to look at /health/json and /diagnostics/json for its data, and so isn't functional.

I note from the visualisation project, that part of the problem could be fixed with a little bit of extra script being output...

<script>window.metricsEndpoint = 'http://localhost:1234/json';</script>

But the health checks endpoint is hard-coded. :(

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions