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
| 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) |