Closed andres-lago closed 6 years ago
Sometimes you can need to specify to babar-agent a directory to save the babar.log file. If the directory contains the symbol "/", the agent crashes. Example:
babar.log
-javaagent:./babar-agent-0.2.0-SNAPSHOT.jar=dir=/tmp,StackTraceProfiler[profilingMs=60000,reportingMs=60000],JVMProfiler[profilingMs=60000,reservedMB=10376],ProcFSProfiler[profilingMs=60000]"
-javaagent:./babar-agent-0.2.0-SNAPSHOT.jar=
,StackTraceProfiler[profilingMs=60000,reportingMs=60000],JVMProfiler[profilingMs=60000,reservedMB=10376],ProcFSProfiler[profilingMs=60000]"
The correction is quite simple, you must modify ligne 45 of com/criteo/babar/agent/config/AgentConfig.java :
com/criteo/babar/agent/config/AgentConfig.java
before: static String kv = "([a-zA-Z0-9_\\-\\.]+)=([a-zA-Z0-9:_\\-\\.]+)";
static String kv = "([a-zA-Z0-9_\\-\\.]+)=([a-zA-Z0-9:_\\-\\.]+)";
after: static String kv = "([a-zA-Z0-9_\\-\\.]+)=([a-zA-Z0-9:_\\-\\./]+)";
static String kv = "([a-zA-Z0-9_\\-\\.]+)=([a-zA-Z0-9:_\\-\\./]+)";
and rebuild babar-agent.
Hello @andres-lago, thanks a lot for reporting the issue! I fixed it with PR #19 that was just merged :)
Sometimes you can need to specify to babar-agent a directory to save the
babar.log
file. If the directory contains the symbol "/", the agent crashes. Example:-javaagent:./babar-agent-0.2.0-SNAPSHOT.jar=
dir=/tmp,StackTraceProfiler[profilingMs=60000,reportingMs=60000],JVMProfiler[profilingMs=60000,reservedMB=10376],ProcFSProfiler[profilingMs=60000]"
The correction is quite simple, you must modify ligne 45 of
com/criteo/babar/agent/config/AgentConfig.java
:before:
static String kv = "([a-zA-Z0-9_\\-\\.]+)=([a-zA-Z0-9:_\\-\\.]+)";
after:
static String kv = "([a-zA-Z0-9_\\-\\.]+)=([a-zA-Z0-9:_\\-\\./]+)";
and rebuild babar-agent.