All Products
Search
Document Center

Application Real-Time Monitoring Service:Uninstall an ARMS agent for Go

Last Updated:Aug 14, 2024

If you no longer need Application Real-Time Monitoring Service (ARMS) to monitor your Go applications, you can uninstall the ARMS agent. This topic describes how to uninstall an ARMS agent for Go, remove code enhancements from the agent, and clean up the residue caused by mixed compilation failures.

Uninstall the ARMS agent

Generally, instgo restores your code base after the mixed compilation is completed. If you no longer need the code enhancements provided by the ARMS agent, you do not need to delete instgo. Instead, you can perform the following operations to replace instgo with Go and recompile your application.

  1. Optional. Pull the code base and recompile it by running the go build command.

  2. Deploy the application in the production environment in place of the original one.

Clean up the residue caused by mixed compilation

During the mixed compilation, the ARMS agent for Go modifies some of your files to add code enhancements. After the mixed compilation is complete, the ARMS agent for Go automatically cleans up the modified files. However, you must manually clean up the files in the following scenarios:

  • The compilation was forcibly stopped or killed.

  • instgo unexpectedly exited due to panic.

In the preceding scenarios, you can manually run the clean command to clean up the modified files.

Linux/Darwin

./instgo clean

Windows

.\instgo.exe clean

Delete instgo

If you no longer need instgo, perform the following steps to delete it.

  1. Delete all files in the cache directory specified by the --cacheDir command during compilation. If no cache directory is specified, use the default cache directory.

    Linux/Darwin

    # Replace ${cacheDir} with the specified cache directory.
    rm -rf ${cacheDir}/aliyun-go-agent
    # Use the default cache directory.
    rm -rf /opt/.opt/aliyun-go-agent

    Windows

    # Replace ${cacheDir} with the specified cache directory.
    rmdir ${cacheDir}\aliyun-go-agent -Recurse
    # Use the default cache directory.
    rmdir C:\ProgramData\.opt\aliyun-go-agent -Recurse
  2. Delete instgo.