You can customize the agent behaviour through Go environment options.

copy
icon/buttons/copy
# Example
env ATATUS_LICENSE_KEY="lic_apm_aajer7238823kkdsv" ATATUS_APP_NAME="Go App" go run *.go

Configurations

You can set following configurations in the Go agent.

Option Description Type
ATATUS_LICENSE_KEY APM License Key of your account. string
ATATUS_APP_NAME Name of your Go project/app. string
ATATUS_APP_VERSION Application version to identify release of your app. string
ATATUS_CAPTURE_BODY Capture request body in traces. string
ATATUS_ANALYTICS Flag to enable/disable app analytics. string
ATATUS_TRACING Flag to enable or disable distributed tracing. string
ATATUS_LOG_LEVEL Sets the logging level for the agent. string
ATATUS_LOG_FILE Set the log file path for the agent. string

All above configurations will set your environment as follows.

copy
icon/buttons/copy
export ATATUS_LICENSE_KEY="APM_LIC_KEY"
export ATATUS_APP_NAME="Go App"
export ATATUS_APP_VERSION="1.0.0"
export ATATUS_CAPTURE_BODY="all"
export ATATUS_ANALYTICS="true"
export ATATUS_TRACING="true"
export ATATUS_LOG_LEVEL="debug"
export ATATUS_LOG_FILE="/var/log/atatus-go-agent.log"

Setting app version

Setting an application version helps track and differentiate your app releases within Atatus. It is highly recommended to define ATATUS_APP_VERSION for better visibility and traceability.

copy
icon/buttons/copy
# Environment
export ATATUS_APP_VERSION="1.2.0"

Enable Capture Body

By default, request body capture is disabled. To trace the request body in your transactions, enable this option. Captured only for the following Content-Type headers: application/x-www-form-urlencoded, text/*, application/json, application/xml.

copy
icon/buttons/copy
# Environment
export ATATUS_CAPTURE_BODY="all"

Setting analytics

App Analytics tracks each request with contextual metadata for in-depth insights. Enable it using the environment variable below:

copy
icon/buttons/copy
# Environment
export ATATUS_ANALYTICS="true"

Enable debug log level

If you're troubleshooting issues (like missing data or agent crashes), enable debug-level logging. You can also configure a custom log file path. Supported log levels: error, warn, info, debug.

Send logs to success@atatus.com for analysis.

copy
icon/buttons/copy
# Environment
export ATATUS_LOG_LEVEL="debug"
export ATATUS_LOG_FILE="/var/log/atatus-go-agent.log"