mirror of
https://github.com/zeromicro/go-zero.git
synced 2025-02-03 00:38:40 +08:00
chore: refactor (#3295)
This commit is contained in:
parent
1b5946346e
commit
b92e706ce1
@ -33,7 +33,6 @@ var (
|
|||||||
|
|
||||||
// StartAgent starts an opentelemetry agent.
|
// StartAgent starts an opentelemetry agent.
|
||||||
func StartAgent(c Config) {
|
func StartAgent(c Config) {
|
||||||
|
|
||||||
if c.Disabled {
|
if c.Disabled {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -73,6 +73,7 @@ func TestStartAgent(t *testing.T) {
|
|||||||
StartAgent(c6)
|
StartAgent(c6)
|
||||||
StartAgent(c7)
|
StartAgent(c7)
|
||||||
StartAgent(c8)
|
StartAgent(c8)
|
||||||
|
defer StopAgent()
|
||||||
|
|
||||||
lock.Lock()
|
lock.Lock()
|
||||||
defer lock.Unlock()
|
defer lock.Unlock()
|
||||||
|
@ -17,7 +17,6 @@ type Config struct {
|
|||||||
// For example
|
// For example
|
||||||
// /v1/traces
|
// /v1/traces
|
||||||
OtlpHttpPath string `json:",optional"`
|
OtlpHttpPath string `json:",optional"`
|
||||||
|
// Disabled indicates whether StartAgent starts the agent.
|
||||||
// Disabled indicates whether StartAgent should be called when starting the server.
|
Disabled bool `json:",optional"`
|
||||||
Disabled bool
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user