Customizing the J2SE data collector
You can set the variables to change the default behavior of the J2SE data collector.
User-defined environment variables for the J2SE data collector.
For J2SE monitoring in IBM Cloud Private or OpenShift, set the following variables in the application yaml file.
For on-premises applications, set the following variables as environment variables or in the
|APPLICATION_NAME||Any value that you want for the application name.||The APPLICATION_NAME is used for the resource name in the UI. If APPLICATION_NAME is specified, it is displayed in the resource name. Otherwise, deployment name(Kubernetes environment) or host name(on-premise environment) is displayed in the
- name: APPLICATION_NAME
|LOG_REST_PAYLOAD||true||By default, it is false. When you enable this variable by setting it as true, the payload details are recorded in the log.
- name: LOG_REST_PAYLOAD
|IBM_APM_RESTCLIENT_LOGLEVEL||This variable works together with LOG_REST_PAYLOAD. Specify this variable when you set the LOG_REST_PAYLOAD as true.
|- DEBUG_MAX: Only useful debug information is printed in the log, for example, collected data, data that are sent to server, and server response.
- ERROR: Only information about exceptions and unexpected situations is printed in the log.
- INFO: The summary information about the data collector for the user to know what it is doing is printed in the log.
- WARN: Warning information is printed in the log.
If you do not specify this variable, it is INFO by default.
|OPENTRACING_ENABLED||false||By default, the J2SE data collector enables OpenTracing function. You can disable OpenTracing by setting the environment variable to false.
- name: OPENTRACING_ENABLED
|The default sampler type is probabilistic, and the default sampler param is 0.01, which means that 1 in 100 traces will be sampled. You can set it to other values. For more information, see Sampling.||When the OpenTracing function is enabled, you can set the OpenTracing sampler type and param. The sampling type and param variables must be set in pairs. If you set only
- name: JAEGER_SAMPLER_TYPE
- name: JAEGER_SAMPLER_PARAM
|LATENCY_SAMPLER_PARAM||Any value between 0 and 1||The default value is 0.1, which means getting 1 request out of 10 requests. The value must be between 0 and 1. The value of 0 means no latency data will be collected. The value of 1 means no sampler and all requests data will be collected.
- name: LATENCY_SAMPLER_PARAM