When you connect an application to AHAS Application Protection, you can modify the client start parameters in the start command to control the client's behavior. This topic describes the supported start parameters for the client, software development kit (SDK), and Java Agent.
Client start parameters
| Name | Description | Type | Default value | Notes |
| -Dproject.name | Specifies the application name. The name appears in the application list of AHAS Application Protection. | String | The full name of the class where the Main function is located. | Optional. Configuration is recommended. |
| -Dcsp.sentinel.app.type | Specifies the application type. | Int | 0 (APP_TYPE_COMMON) | Optional. Supported in versions 1.3.0 and later. Manual configuration is not usually required. |
| -Dcsp.sentinel.metric.file.single.size | The size of a single monitoring log file. | Long | 52428800 (50 MB) | Optional |
| -Dcsp.sentinel.metric.file.total.count | The maximum number of monitoring log files. | Int | 6 | Optional |
| -Dcsp.sentinel.statistic.max.rt | The maximum valid response time in milliseconds (ms). If the response time exceeds this value, it is recorded as this value. | Int | 4900 | Optional |
| -Dcsp.sentinel.log.dir | The directory for Sentinel log files. | String | ${user.home}/logs/csp/ | Optional |
| -Dcsp.sentinel.log.use.pid | Specifies whether to include the process ID in the log file name. This is used when multiple applications are deployed on a single machine. | Boolean | false | Optional |
| -Dcsp.sentinel.log.output.type | The output type for record logs. file indicates output to a file. console indicates output to the terminal. | String | file | Optional. Supported in versions 1.3.6 and later. |
| -Dcsp.sentinel.heartbeat.interval.ms | The heartbeat packet sending interval in milliseconds (ms). | Long | 5 ms | Optional. If this parameter is not configured, the default value is fetched from the corresponding HeartbeatSender. |
| -Dcsp.sentinel.web.servlet.block.page | The throttling page. | String | null | Optional |
| -Dcsp.sentinel.url.clean.config.path | The path of the configuration file for URL convergence rules. | String | Empty | Optional |
| -Dcsp.sentinel.url.suffix.exclude.pattern | The URL suffixes to converge. | String | png,gif,mjs,css,htm,html,jpg,jpeg,map,ico,ttf,woff | Optional |
Note The versions listed refer to the ahas-sentinel-client version.
SDK start parameters
The following table lists the Spring Boot starter configuration items that AHAS supports.
Note Configure the following items in the application.properties configuration file.
| Configuration item | Description | Default value |
spring.cloud.ahas.sentinel.aspectj.enabled | Automatically enables annotation support. | true |
spring.cloud.ahas.sentinel.mybatis.enabled | Automatically enables MyBatis instrumentation support. | true |
spring.cloud.ahas.sentinel.web.enabled | Automatically enables Spring Web instrumentation support. | true |
spring.cloud.ahas.sentinel.web.http-method-prefix | Includes the HTTP method prefix in Web instrumentation (since 1.5.3). | false |
Java Agent start parameters
Pass parameters using the -D option.
| Parameter | Controlled plugin | Default status |
ahas.sentinel.agent.plugin.web.spring.enabled | Spring Web plugin | Enabled |
ahas.sentinel.agent.plugin.mybatis.enabled | MyBatis plugin | Enabled |
ahas.sentinel.agent.plugin.dubbo.enabled | Dubbo plugin | Enabled |
ahas.sentinel.agent.plugin.grpc.enabled | gRPC plugin | Enabled |
ahas.sentinel.agent.plugin.gateway.enabled | API gateway plugin | Enabled |
ahas.sentinel.agent.plugin.web.servlet.enabled | Web Servlet plugin | shutdown |
ahas.sentinel.agent.plugin.db.enabled | All Java Database Connectivity (JDBC) plugins | Disabled |
ahas.sentinel.agent.plugin.cache.enabled | All cache plugins | shutdown |
ahas.sentinel.agent.plugin.mq.enabled | All MQ client plugins | shutdown |
Example:
-Dahas.sentinel.agent.plugin.web.servlet.enabled=false该文章对您有帮助吗?