Go

Go is a programming language created by Robert Griesemer, Rob Pike, and Ken Thompson. Go is the cloud-native programming language of choice for many organizations.

Capabilities

  • Automatic injection and instrumentation of 64 bit Go executables
  • Always-on 24x7 production grade CPU profiling
  • Go-specific metrics:
    • Suspension time
    • Committed, Used, Idle, and Live heap memory sizes
    • Goroutine count (application / system)
    • Go managed memory heaps: Off-heap, Stack, and overall Committed / Used memory
    • Allocated Go object count
    • Garbage collector invocation count
    • Go runtime system call count, cgo call count
    • Global Goroutine run queue size
    • Parked, Out of work, and Overall worker-thread counts, Idle scheduling context count
  • Incoming / Outgoing web request monitoring
  • Custom service monitoring

Support and desupport

The Go release policy supports the last two major Go versions.

Whenever a new Golang version is released, we add support for that version. DESK will add support for each minor and patch version; you can see the Version matrix for more details.

DESK will follow this support model, but will support each Go version at least half a year longer to give our customers time for upgrades.

Go version Vendor released Vendor End of life Supported by DESK until First supported OneAgent Version Last supported OneAgent Version
1.7 2016-08-15 2017-08-24 2018-12-31 1.129 1.157
1.8 2017-02-16 2018-02-16 2018-12-31 1.129 1.157
1.9 2017-08-24 2018-08-24 2019-06-30 1.129 1.171
1.10 2018-02-16 2019-02-25 2019-08-31 1.143 1.173
1.11 2018-08-24 2019-08-24 2020-02-28 1.155
1.12 2019-02-25 2020-02-25 2020-08-31 1.165
1.13 2019-09-03 2020-09-03 2021-03-31 1.179

Version Matrix

OneAgent versions Go 1.7 Go 1.8 Go 1.9 Go 1.10 Go 1.11 Go 1.12 Go 1.13
v1.129, v1.131, v1.133 1.7.0 - 1.7.5 1.8.0 - 1.8.5 1.9.0 - 1.9.2 - - - -
v1.135, v1.137 1.7.0 - 1.7.6 1.8.0 - 1.8.6 1.9.0 - 1.9.2 - - - -
v1.139 1.7.0 - 1.7.6 1.8.0 - 1.8.6 1.9.0 - 1.9.3 - - - -
v1.141 1.7.0 - 1.7.6 1.8.0 - 1.8.7 1.9.0 - 1.9.4 - - - -
v1.143 1.7.0 - 1.7.6 1.8.0 - 1.8.7 1.9.0 - 1.9.4 1.10.0 - - -
v1.145 1.7.0 - 1.7.6 1.8.0 - 1.8.7 1.9.0 - 1.9.5 1.10.0 - 1.10.1 - - -
v1.147 1.7.0 - 1.7.6 1.8.0 - 1.8.7 1.9.0 - 1.9.6 1.10.0 - 1.10.2 - - -
v1.151 1.7.0 - 1.7.6 1.8.0 - 1.8.7 1.9.0 - 1.9.7 1.10.0 - 1.10.3 - - -
v1.155 1.7.0 - 1.7.6 1.8.0 - 1.8.7 1.9.0 - 1.9.7 1.10.0 - 1.10.4 1.11.0 - -
v1.157 1.7.0 - 1.7.6 1.8.0 - 1.8.7 1.9.0 - 1.9.7 1.10.0 - 1.10.4 1.11.0 - 1.11.1 - -
v1.159 - - 1.9.0 - 1.9.7 1.10.0 - 1.10.5 1.11.0 - 1.11.2 - -
v1.161, v1.163 - - 1.9.0 - 1.9.7 1.10.0 - 1.10.7 1.11.0 - 1.11.4 - -
v1.165 - - 1.9.0 - 1.9.7 1.10.0 - 1.10.8 1.11.0 - 1.11.5 1.12.0 -
v1.167 - - 1.9.0 - 1.9.7 1.10.0 - 1.10.8 1.11.0 - 1.11.6 1.12.0 - 1.12.1 -
v1.169 - - 1.9.0 - 1.9.7 1.10.0 - 1.10.8 1.11.0 - 1.11.9 1.12.0 - 1.12.4 -
v1.171 - - 1.9.0 - 1.9.7 1.10.0 - 1.10.8 1.11.0 - 1.11.10 1.12.0 - 1.12.5 -
v1.173 - - 1.9.0 - 1.9.7 1.10.0 - 1.10.8 1.11.0 - 1.11.11 1.12.0 - 1.12.6 -
v1.175 - - 1.9.0 - 1.9.7 1.10.0 - 1.10.8 1.11.0 - 1.11.12 1.12.0 - 1.12.7 -
v1.177 - - 1.9.0 - 1.9.7 1.10.0 - 1.10.8 1.11.0 - 1.11.13 1.12.0 - 1.12.8 -
v1.179 - - 1.9.0 - 1.9.7 1.10.0 - 1.10.8 1.11.0 - 1.11.13 1.12.0 - 1.12.9 1.13.0
v1.181 - - 1.9.0 - 1.9.7 1.10.0 - 1.10.8 1.11.0 - 1.11.13 1.12.0 - 1.12.12 1.13.0 - 1.13.3

Up until OneAgent version 1.179, 32 bit executables were supported as well.

Known Limitations

Support limited to official, stable Go releases

Go support is limited to official, stable Go releases compiled using the golang toolchain.

OneAgent doesn't support binaries compiled using the gccgo toolchain.

Application binary must be dynamically linked

This restriction applies only to Linux systems.

OneAgent fully automatic injection requires dynamically linked application binaries. Dynamic linking is automatically applied if the application uses certain standard runtime library packages (net/http).

In all other cases, dynamic linking can be enforced with the command line option -ldflags '-linkmode=external'.

Example

Consider the following minimalistic Go application (GoMinimal.go):

package main
import "fmt"

func main() {
    fmt.Print("Enter text: ")
    var input string
    fmt.Scanln(&input)
    fmt.Print(input)
}

Building the application will result in a statically linked application binary:

$ go build GoMinimal.go
$ file GoMinimal
GoMinimal: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, not stripped

Enforce dynamic linking with -ldflags '-linkmode=external':

$ go build -ldflags '-linkmode=external' GoMinimal.go
$ file GoMinimal
GoMinimal: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32

The application can't be built with the -linkshared option

Go supports dynamic linking of the Go standard library. This build mode is rarely used and OneAgent won't inject into applications built this way.

Sample application of -linkshared

$ go install -buildmode=shared -linkshared std
$ go build -linkshared GoMinimal.go

The resulting application binary will be rejected by OneAgent.

Applications that load Go plugins aren't supported

A Go plugin is a package compiled using the build flag -buildmode=plugin to produce a shared object file. This build mode is rarely used and OneAgent will disable deep monitoring when an application actually loads a Go plugin.

Vendored third party packages aren't supported

Go vendoring is used to include local copies of external dependencies in the project repository. It was especially used to pin versions of third party packages before Go module support was added. OneAgent will not monitor vendored packages, for example gRPC services are supported only when using Go modules or when importing go-grpc directly without using a dependency management system.

Application must contain a symbol table

OneAgent relies on information stored in the application binary files symbol table. By default, Go generates a symbol table into the application binary, but this can be suppressed by command line parameters or external tools like strip.

go run

The rarely used go run <application> command builds and runs the application on the fly. Because the output application file is temporary (deleted automatically after application termination), the application binary is generated without a symbol table. OneAgent therefore cannot monitor the generated application.

Support for musl libc

The musl libc library is a drop-in replacement for glibc. Starting with OneAgent version 1.167, DESK supports musl libc-based Go applications (such as Alpine Linux).

The only additional requirement is that the application binary is built using the system linker by adding -ldflags '-linkmode external' to the build command line.