let service = new PrometheusMetricsService();
service.configure(ConfigParams.fromTuples(
"connection.protocol", "http",
"connection.host", "localhost",
"connection.port", 8080
));
service.open("123", (err) => {
console.log("The Prometheus metrics service is accessible at http://+:8080/metrics");
});
Service that exposes
"/metrics"
route for Prometheus to scap performance metrics.Configuration parameters
References
*:logger:*:*:1.0
(optional) ILogger components to pass log messages*:counters:*:*:1.0
(optional) ICounters components to pass collected measurements*:discovery:*:*:1.0
(optional) IDiscovery services to resolve connection*:endpoint:http:*:1.0
(optional) HttpEndpoint reference to expose REST operation*:counters:prometheus:*:1.0
PrometheusCounters reference to retrieve collected metricsRestService
RestClient
Example
let service = new PrometheusMetricsService(); service.configure(ConfigParams.fromTuples( "connection.protocol", "http", "connection.host", "localhost", "connection.port", 8080 )); service.open("123", (err) => { console.log("The Prometheus metrics service is accessible at http://+:8080/metrics"); });