You can customize the agent behaviour through Java runtime options.

# Example
java -javaagent:atatus-java-agent.jar -Datatus.license_key="****" -Datatus.app_name="Java App" -Datatus.service_version=1.0.0 -jar my-app.jar

Configurations

You can set following configurations in the Java agent.

Option Description Type
license_key APM License Key of your account. string
app_name Name of your Java project/app. string
service_version Application version to identify release of your app. string
environment Environments allow you to easily filter data on your APM app. string
log_body Log request body in traces. string
log_body_ignore_urls Avoid sending sensitive data to Atatus. string
ignore_urls List of URLs that Atatus agent will ignore from monitoring. string
log_level Sets the logging level for the agent. This option is case-insensitive. string
ignore_status_codes List of status code should be ignored. string
tracing enable/disable distributed tracing. boolean
enabled enable/disable the agent. boolean

All above configurations will have a prefix atatus. as follows.

copy
icon/buttons/copy
-Datatus.license_key=APM_LIC_KEY

-Datatus.app_name="YOUR_APP_NAME"

-Datatus.service_version=1.2.0

-Datatus.tracing=true

-Datatus.environment=Production

-Datatus.log_body=all

-Datatus.log_body_ignore_urls="/login,/signup,/card/*,*/password-reset"

-Datatus.ignore_urls="/health*,/ping,*/internal/*"

-Datatus.log_level=Debug

-Datatus.ignore_status_codes="404,429,503"

-Datatus.enabled=false

-Dhttps.proxyHost=127.0.0.1
-Dhttps.proxyPort=8888

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 service_version.

copy
icon/buttons/copy
// In Properties
-Datatus.service_version=1.2.0

// Environment
export ATATUS_SERVICE_VERSION=1.2.0

Setting environment

If you are tracking multiple environments with a single APM project, then you can set a environment as follows.

copy
icon/buttons/copy
// In Properties
-Datatus.environment=Production

// Environment
export ATATUS_ENVIRONMENT=Production

Enable Capture Body in API Analytics

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 following content-types: application/x-www-form-urlencoded, text/*, application/json, application/xml.

copy
icon/buttons/copy
// In Properties
-Datatus.log_body=all

// Environment
export ATATUS_LOG_BODY=all

Ignore Log Body Urls

Using this option, you can avoid capturing request body for the list of URLs. This way, you can avoid sending sensitive data to Atatus. The ignore URLs can be either string or Regex.

copy
icon/buttons/copy
-Datatus.log_body_ignore_urls="/login,/signup,/card/*,*/password-reset"

Ignore Urls

Using this option, you can exclude specific URLs from being monitored by Atatus. For example, you may not want to monitor certain endpoints such as health, ping, heartbeat or internals. Ignore URLs can be either string or Regex.

copy
icon/buttons/copy
// In Properties
-Datatus.ignore_urls="/health*,/ping,*/internal/*"

// Environment
export ATATUS_IGNORE_URLS="/health*,/ping,*/internal/*"

Enable debug log level

In case if you are facing any issues with Java APM (Example: no data is coming, crashing the server, etc), you can enable the debug log level in jvm options and send the logs to success@atatus.com. The available log levels are Error, Warn, Info, Debug.

copy
icon/buttons/copy
// In Properties
-Datatus.log_level=Debug

// Environment
export ATATUS_LOG_LEVEL=Debug

Ignore status codes

Using this option, you can add list of status codes that you don't want to see in the error metrics.

This option accepts comma separated 4XX and 5XX status codes.

copy
icon/buttons/copy
-Datatus.ignore_status_codes="404,429,503"

Set application package path

You can set your application package path to find exact source line in Java Exceptions.

copy
icon/buttons/copy
-Datatus.application_packages="<YOUR_PACKAGE_PATH>"
example:
-Datatus.application_packages="org.example,org.another.example"

Disable agent

Using this option, you can completely disable the agent, including instrumentation and remote config polling. You can set enabled option to false to disable agent.

copy
icon/buttons/copy
// In Properties
-Datatus.enabled=false

// Environment
export ATATUS_ENABLED=false

Proxy URL

You can set up the Atatus Java Agent to connect to a proxy, then the proxy can connect to Atatus Server through the firewall.

HTTPS Proxy:

copy
icon/buttons/copy
// In Properties
-Dhttps.proxyHost=127.0.0.1
-Dhttps.proxyPort=8888

HTTP Proxy:

copy
icon/buttons/copy
// In Properties
-Dhttp.proxyHost=127.0.0.1
-Dhttp.proxyPort=8888