Java Agent v2.1.0
2021-12-15
Modification of the agent management scheme
Agent version scheme modified
The agent version scheme has been changed to 2.1.x.
Modification of the configuration of the Java agent release package
From whatap.agent-2.1.0, the configuration of the Java agent package has been changed.
- whatap.agent-2.1.0.jar: jar for the agent core
- whatap.agent.proxy-2.1.0.jar: Direct connection to the WhaTap server is difficult, so bypass connection is supported.
- whatap-logsink-lz4-1.7.0.jar: Plug module to compress data in the log monitoring (LogSink) (GZip provided in JDK is the default)
Expansion of Java support range
By using the ASM library v9.2, the support scope of WhaTap Labs Java agent has been expanded from java14 to java17.
Automation of multi-server tracing (mtrace)
The default policy for tracing the multi-server connection modified
The default value of agent-to-agent call performance tracing has been changed to on.
tx_caller_meter_enabled = true
sql_dbc_meter_enabled = true
httpc_host_meter_enabled = true
actx_meter_enabled = true
actx_slice_meter_enabled = true
tx_caller_meter_pkind_enabled = true
actx_meter_pkind_enabled = true
Automatic application of the multi-server tracing
It changed to automatically process only the transactions called by the browser based on the user agent. (mtrace_rate works only when the user agent starts with "Moz.")
mtrace_auto_enabled=true (default value)
mtraceable_user_agent=Moz (default value)
Automatic adjustment of the multi-server tracing rate
A function has been added to automatically lower the rate in an environment of 500 tps or higher if mtrace_rate has not been specified. Based on 500 tps in a single process, mtrace_rate is 10% by default. As tps increases, mtrace_rate is automatically adjusted at the same rate.
Changes in collection of dependencies between servers (agents)
It changed to collect caller data by OID when calls occur between agents belonging to different projects.
In the previous version, collection was made by PKIND (pcode + okind). It has been modified to collect by POID (pcode + oid).
Enhancement of tracing information
?
and the rest in the DB connection URL have been removed.
When collecting the JDBC connection data to trace the SQL performance, ?
and the rest have been removed.
ContextPath reflected in URL normalization
It changed to reflect ContextPath when performing URL normalization.
Change in URL patterns to set for the server
In WhaTap Labs, the patterns of the service or HttpClient URL have been changed to be set and collected by the WhaTap server.
URL pattern configuration targets
- Service URL
- HttpClient URL
It is difficult to change in the Kubernetes environment with the agent setup method.
ONAME output in the agent log
It changed the agent log's output from the (date)(PID)(message) format to the (date)(agent name)(message) format.
20211224 05:12:31(GMT) [JA-161-111][UrlNorm] Service PathTree done. PathTree=0
20211224 05:12:31(GMT) [JA-161-111][HttpcUrlNorm] PathTree build done. PathTree=0
Adding the custom counter
It changed to use the plug-in to trace the app extra counter. However, the agent requires implementation of the plug-in, ExtraCounter.x.
${WHATAP}
/plugin/ExtraCounter.x
$pack.put("mycount",100);
$pack.put("myrandom",(float)( whatap.util.KeyGen.next()%100));
Application Log Monitoring
It has added the integrated monitoring function for application logs. Whatap.agent-2.1.0 or later is required to use this log monitoring function in Java applications.
whatap.agent-2.1.0 or later
The function name of WhaTap's application log monitoring is LogSink.
Enabling the log monitoring function
For log monitoring, in whatap.conf, set logsink_enabled
to true
.
logsink_enabled=true
It collects System.out, System.err, and LOGBACK and LOG4J logs of the framework that occur in Java applications. The default value is the same setting as in logsink_enabled
.
logsink_stdout_enabled=logsink_enabled
logsink_stderr_enabled=logsink_enabled
logsink_logback_enabled=logsink_enabled
logsink_log4j_enabled=logsink_enabled
logsink_tomcat_enabled=logsink_enabled
logsink_custom_enabled=logsink_enabled
Collection of log details in the framework
To monitor logs collected from the framework, add the setting and plugin to intercept logs from the module. Set the default category name for logs collected in the framework to AppLog
.
The default value is the same as in the hooklog_enabled
option.
hooklog_logback_enabled=hooklog_enabled;
hooklog_log4j_enabled=hooklog_enabled;
hooklog_tomcat_enabled=hooklog_enabled;
hooklog_custom_methods= (set to collect logs in the user method)
However, logsink_enabled
is applied as the default value for hooklog_enabled
, before startup, it needs to be set to true
.
If you change as hooklog_enabled=true
during operation, log collection is possible after restart.
After changing as logsink_enabled=true
, restart it.
Collection of logs in the user method
hooklog_custom_methods
delivers the content of an arbitrary log framework. Use this to trace logs of the log module created on the website.
hooklog_custom_methods=com.greatshop.common.Log.print
Setting to deliver logs
You can set the maximum size of a single line and the queue size during data transfer.
logsink_queue_size=1000
logsink_line_size=512
Enabling or debugging the compressed log transfer
By the setting, logsink_zip_enabled=true
, the compressed logs can be delivered.
logsink_zip_enabled=false
debug_logsink_zip_enabled=false
All data is not compressed, and the debug options are used to check whether compressed logs are sent.
Minimum size of compressed logs transmission
If the data to send is less than 100 bytes, it is not compressed.
logsink_zip_min_size=100
Size and time of the log's compressed transfer bundle
For compressed transfer, data must be bundled. However, because the next data cannot be waited indefinitely, the maximum time must be specified.
max_buffer_size=65536
max_wait_time=2000
If the data collection size exceeds max_buffer_size
or the log bundling time exceeds max_wait_time
, the agent transfers the log data to the server.