fix hostedgraphite sample code