By default async-profiler writes to /tmp, but since our /tmp is tiny and it gets filled very quickly, I wanted to change this directory to something else using config-profiling-inferred-spans-lib-directory in java agent, but we are still getting a lot of files in /tmp:
apm-activation-events-*.bin
apm-traces-*.jfr
Questions:
Is this expected behavior and config-profiling-inferred-spans-lib-directory comes into the play only when /tmp is not executable?
Is there maybe some other way to change async-profiler's tmp directory?
Is there some policy managing how frequently (or when) those temporary files are supposed to be cleand-up?
this is expected behavior, as this configuration parameter only controls where the async-profiler binaries will be stored for cases when you can't have executables in /tmp.
agent should use the configured JVM temporary directory, thus using something like -Djava.io.tmpdir=/another/path/for/tmp.
Not directly on the files themselves as their size depends on application code and activity. But it's influenced by async profiler parameters, for example reducing the sampling interval with profiling_inferred_spans_sampling_interval might be an option to explore.
Thus, in your case, you should probably set the java.io.tmpdir and use a dedicated temporary directory.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.