Cloud Trace provides a feature set similar to Appstats. It is turned on automatically for all applications running in the App Engine standard environment. You don't add or change any code or configuration to your application to support Trace!
To migrate your Java application away from Appstats:
- Refer to the Appstats page for a listing of the files and the content that was added to support Appstats.
- Using that page as a guide,
- Remove the
appengine-apis-labs.jardependency from your build file (Maven or Gradle), so that it is removed from theWEB-INF/libarea of your web application. This removal applies to all versions ofappengine-apis-lab.jarfrom the Maven repository or from the App Engine SDK. - From your
web.xml, remove allfilterandfilter-mappingelements referring toappstats. - From your
web.xml, remove allservletandservlet-mappingelements referring toappstats. - Make sure all references to
AppstatsFilterare deleted from yourweb.xml.
- Remove the
- Rebuild and redeploy your app.
At this point, your application no longer uses Appstats or the Appstats console, but you can find comparable information about your app in the Cloud Trace console. For more information about using Trace, see the Cloud Trace Quickstart.