You can customize the agent behaviour through Go environment options.

# 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_API_ANALYTICS Flag to enable/disable app analytics. string
ATATUS_LOG_LEVEL Sets the logging level for the agent. This option is case-insensitive. 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_API_ANALYTICS="true"

export ATATUS_LOG_LEVEL="debug"

export ATATUS_LOG_FILE="/var/log/atatus-go-agent.log"

Setting app version

If you use a version to identify releases of your app, you can send it to Atatus. It is highly recommended to set ATATUS_APP_VERSION.

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

Enable Capture Body

This capture body option is disabled by default. If you want to see the request body in traces, you can enable this option in startup options. The body will be captured only in follwing content-types: application/x-www-form-urlencoded, text/*, application/json, application/xml.

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

Setting analytics

App Analytics collects all requests individually with contextual data.

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

Enable debug log level

In case if you are facing any issues with Go APM (Example: no data is coming, crashing the server, etc), you can enable the debug log level and log path in env options then send the logs to success@atatus.com. The available log levels are error, warn, info, debug.

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