Monitoring Go

Supported versions

Go version 1.9 or greater.

Sensor (Data Collection)

Tracked Configuration

  • Root directory
  • Compiler
  • Max procs
  • Visible CPUs
  • PID


  • Memory usage
  • Heap usage
  • GC activity
  • Goroutines

Health Signatures

  • Calls
  • Response time
  • Scaling


The usage of the Go sensor requires a minimal amount of coding in your Go application. Please refer to for detailed instructions on how to activate the Go sensor.


There are two ways to configure the Go sensor:

  1. Inside your app code by providing instana.Options to the instana.InitSensor() call.
  2. Using environment variables (see the General Reference: Environment Variables for Language Sensors).

The in-app configuration takes precedence over environment variables except for following settings:

  • INSTANA_SERVICE_NAME allows to override the service name set in the code
  • INSTANA_DEBUG enables debug logs even if the app code configuration defines a higher logging level
  • INSTANA_AUTO_PROFILE enables continuous profiling with AutoProfile™

AWS Fargate

Instana Go sensor automatically detects if a service is running on AWS Fargate and switches into serverless mode. Instead of the host agent, the Go sensor will send metrics and traces to the serverless acceptor endpoint provided in INSTANA_ENDPOINT_URL and using the agent key set by the INSTANA_AGENT_KEY environment variables. Please refer to the Serverless Monitoring section to learn about other configuration options available in serverless mode.

AWS Lambda

Instana Go sensor supports tracing AWS Lambda function written in Go starting from v1.23.0. Handlers need to be instrumented using the package in order to collect and send trace data. Please refer to AWS Lambda Go documentation for details.

Kubernetes & OpenShift

Refer to the Configure Network Access For Monitored Applications documentation to ensure that your instrumented applications can contact the Instana Host Agent.



To make code instrumentation easy and error-prone, Instana provides native wrappers for most commonly used Go packages.

Standard library

Instrumentation wrappers for Go standard library packages are shipped with the main Go sensor module

Package Go sensor version
net/http >= v1.8.0
database/sql >= v1.15.0

3rd-party libraries

Instrumentation wrappers for 3rd-party libraries are shipped as separate packages to avoid bringing unnecessary depencencies. They are complimentary to the main Go sensor module Most dependency managers, such as go mod, will add the corresponding main module version as a transitive dependency automatically. The minimal supported Go version for the instrumentation package is the same as for 3rd-party package it instruments and may differ from the one supported by the Go sensor.

Package Supported package version Instrumentation package Required Go version >= v1.7.0 go1.11+ >= v1.3.1 go1.11+ >= v1.19.0 go1.9+ >= v1.15.0 go1.9+


Manual tracing in Go works based on the OpenTracing API, and the data those produce get "translated" into Instana through a tracer and sent to the Instana backend. Refer to the Instana Go sensor OpenTracing documentation for details.

End User Monitoring (EUM)

Instana provides deep end user monitoring that links server side traces with browser events to give you a complete view from server to browser.

See the Website Monitoring page for more details.


AutoProfile™ generates and reports process profiles to Instana automatically and continuously. Learn more about profiles in Analyze Profiles section.

To enable AutoProfile™ add EnableAutoProfile: true option in instana.InitSensor(opt). For detailed instructions, see

If you need to enable profiling for an app instrumented with Instana without changing the instana.InitSensor() config, set INSTANA_AUTO_PROFILE=true env variable. Note that this value takes precedence and overrides any attempt to disable profiling from inside the application code.


  • Cross host and cross language tracing