Created
July 26, 2016 09:25
-
-
Save alileza/41193ece58c3f641791dfbb009c61bbf to your computer and use it in GitHub Desktop.
prom-client example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var express = require('express'); | |
var client = require('prom-client'); | |
var server = express(); | |
var counter = new client.Counter('push_notification', 'yaelah gitu aja ga paham', ['type']); | |
server.get('/send', function(req, res){ | |
counter.inc({ type : 'android' }) | |
res.send('sent') | |
}) | |
server.get('/metrics', function(req, res) { | |
res.end(client.register.metrics()); | |
}); | |
server.listen(3000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment