Is config-profiling-inferred-spans-lib-directory always respected?

Kibana: 7.8.1
APM-server: 7.8.1
Elasticsearch: 7.8.1
Java agent: 1.19.0

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:

  1. Is this expected behavior and config-profiling-inferred-spans-lib-directory comes into the play only when /tmp is not executable?
  2. Is there maybe some other way to change async-profiler's tmp directory?
  3. Is there some policy managing how frequently (or when) those temporary files are supposed to be cleand-up?

Hi @giovere

  1. 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.
  2. agent should use the configured JVM temporary directory, thus using something like -Djava.io.tmpdir=/another/path/for/tmp.
  3. 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.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.