Skip to content

Instantly share code, notes, and snippets.

View flaminscotsman's full-sized avatar

flaminscotsman

View GitHub Profile
@flaminscotsman
flaminscotsman / example.py
Created October 5, 2017 11:09
ConstLabels example
import types
from functools import partial
from prometheus_client import *
# Dummy objects to get this to work
def resolve_current_machine_name():
import socket
return socket.getaddrinfo(socket.gethostname(), 0, 0, 0, 0, socket.AI_CANONNAME)[0][3]
config = {'generic':{'production': True}}