Skip to content

Instantly share code, notes, and snippets.

@wzf1943
wzf1943 / main.go
Created May 3, 2019 23:34
missing part on cherry pick v2 branch in main.go
stats := metrics.NewWithEpic("jetstreamd", options.EpicPlugin, options.EpicPassphrase, options.EpicConfigPath)
epicenv := os.Getenv("EPIC_ENVIRONMENT")
if epicenv == "" {
// if EPIC_ENVIRONMENT is not set then use default value
epicenv = options.EpicEnv
}
// port go-metrics to default prometheus handler
pClient := mp.NewPrometheusProvider(stats.Registry(), NAMESPACE, epicenv, pc.DefaultRegisterer, 1*time.Second)