runtime
Operations that interact with Go’s runtime system.
⚠️
This configuration introduces a way to access the Goroutine Local Storage (GLS), which is not
meant to be used directly by end-users. This is intended to be used only by tracer internals to
enable trace context forwarding in places where a
context.Context
value is not available.GLS Access
Definition of
runtime.g
Add blank import of
unsafe
Introduce new declarations:
//go:linkname __dd_orchestrion_gls_get __dd_orchestrion_gls_get
var __dd_orchestrion_gls_get = func() any {
return getg().m.curg.__dd_gls
}
//go:linkname __dd_orchestrion_gls_set __dd_orchestrion_gls_set
var __dd_orchestrion_gls_set = func(val any) {
getg().m.curg.__dd_gls = val
}
Clear GLS slot on goroutine exit
All of
- Import path
runtime
- Function body
- Function declaration
- Function name
goexit1
Prepend statements produced by the following template:
getg().__dd_gls = nil