in tools/go-agent/instrument/agentcore/instrument.go [233:252]
func init() {
if {{.TLSGetLinkMethod}} != nil && {{.TLSSetLinkMethod}} != nil {
GetGLS = {{.TLSGetLinkMethod}}
SetGLS = {{.TLSSetLinkMethod}}
}
if {{.GetGoroutineIDLinkMethod}} != nil {
GetGoID = {{.GetGoroutineIDLinkMethod}}
}
if {{.SetGlobalOperatorLinkMethod}} != nil && {{.GetGlobalOperatorLinkMethod}} != nil {
SetGlobalOperator = {{.SetGlobalOperatorLinkMethod}}
GetGlobalOperator = {{.GetGlobalOperatorLinkMethod}}
SetGlobalOperator(newTracer()) // setting the global tracer when init the agent core
}
if {{.GetInitNotifyLinkMethod}} != nil {
GetInitNotify = {{.GetInitNotifyLinkMethod}}
}
if {{.MetricsObtainMethodName}} != nil {
MetricsObtain = {{.MetricsObtainMethodName}}
}
}