feat: support optional otel global initialization for #3284 (#3292)

This commit is contained in:
MiNG
2023-05-28 19:41:48 +08:00
committed by GitHub
parent 28d3905731
commit 1b5946346e
3 changed files with 18 additions and 1 deletions

View File

@@ -33,6 +33,11 @@ var (
// StartAgent starts an opentelemetry agent.
func StartAgent(c Config) {
if c.Disabled {
return
}
lock.Lock()
defer lock.Unlock()