Dynatrace OneAgent for Go can monitor your Golang applications as well as any third-party Go-based applications that your own applications may rely on. This monitoring technology allows you to capture data that is well beyond the capabilities of traditional monitoring solutions. Dynatrace extracts internal Go runtime information that is inaccessible with public Go runtime APIs.
Go monitoring is enabled by default for all new environments. However, only applications that are listed as allowed in the pre-deployed process monitoring rules will be monitored. To enable monitoring of additional processes, you'll need to define your own monitoring rules.
To activate Go monitoring
Go to Settings > Monitoring > Monitored technologies.
Find Go in the list of supported technologies, and select Edit (pencil icon).
Turn on Monitor Go on every host.
Create a process monitoring rule to enable deep monitoring of the selected processes.
Support for the monitoring of statically linked Go applications is available starting with Dynatrace OneAgent version 1.203.
Unless there are dependencies on packages using cgo, the Go toolchain produces statically linked Go executables. These applications don't allow loading of additional code dynamically, so it is impossible for most monitoring agents to auto-inject themselves into such applications.
With Dynatrace, you do not need to force your application to be dynamically linked or change the source code if you want to monitor statically linked Go applications. There are several limitations for this solution, though.
To activate Go static application monitoring
Go to Settings > Monitoring > Monitored technologies.
Find Go in the list of supported technologies, and select Edit (pencil icon).
Ensure that Monitor Go on every host is turned on.
Turn on Enable Go static application monitoring on every host.
Create a process monitoring rule to enable deep monitoring of each statically linked Go executable.
OneAgent has a set of built-in process monitoring rules that define which processes OneAgent monitors. To check the current process monitoring rules, go to Settings > Processes and containers > Built-in process monitoring rules.
By default, OneAgent monitors a predefined list of Go applications (for example, Gorouter and InfluxDB) and dynamically linked Go applications started in a container. To monitor an arbitrary Go application, define a custom process monitoring rule.