add opentelemetry test (#1002)

This commit is contained in:
neosu
2021-09-07 09:26:45 +08:00
committed by GitHub
parent 10805577f5
commit dec6309c55
3 changed files with 419 additions and 2 deletions

View File

@@ -18,12 +18,12 @@ var (
enabled syncx.AtomicBool
)
// Enabled returns if prometheus is enabled.
// Enabled returns if opentelemetry is enabled.
func Enabled() bool {
return enabled.True()
}
// StartAgent starts a prometheus agent.
// StartAgent starts a opentelemetry agent.
func StartAgent(c Config) {
once.Do(func() {
if len(c.Endpoint) == 0 {