Does elastic.apm.span_frames_min_duration setting apply?

If you are asking about a problem you are experiencing, please use the following template, as it will help us help you. If you have a different problem, please delete all of this text :slight_smile:

Kibana version:7.5.2

Elasticsearch version:7.5.2

APM Server version:7.5.2

APM Agent language and version:apm-java-agent-1.12.0, java 1.8

Browser version:chrome 79.9.3945.130

Original install method (e.g. download page, yum, deb, from source, etc.) and version:

Fresh install or upgraded from other version?

Is there anything special in your setup? For example, are you using the Logstash or Kafka outputs? Are you using a load balancer in front of the APM Servers? Have you changed index pattern, generated custom templates, changed agent configuration etc.

Description of the problem including expected versus actual behavior. Please include screenshots (if relevant):
I thought some span was due to short duration time because it was not visible.
So, i add properties.
But Stacktrace does not appear even though I have added elastic.apm.span_frames_min_duration = 0ms to the file.

here is my config

and result

How should I set to see stacktrace for all tasks?

From the documentation:

To disable stack trace collection for spans completely, set the value to 0ms

The minimal value is 1ms and that's on purpose- collecting the stack trace has considerable overhead and shouldn't be collected for too many spans.

thank you!
However, despite changing the settings, stacktrace is not visible.


Could you set your log_level to debug and upload the agents logs? I'd like to verify that the configuration option was detected correctly.

See also

Looking at the log, it seems that all the settings are applied correctly.
Here is my log.....

2020-02-02 13:47:16.520 [apm-server-healthcheck] DEBUG - Starting healthcheck to http://my-apm-server-ip:8200/
2020-02-02 13:47:16.534 [apm-server-healthcheck] INFO - Elastic APM server is available: {  "build_date": "2020-01-15T10:21:12Z",  "build_sha": "0683f8094f42fecedd54cee09c0991febd8ce59a",  "version": "7.5.2"}
2020-02-02 13:47:16.536 [apm-server-healthcheck] DEBUG - APM server http://my-apm-server-ip:8200/ version is: 7.5.2
2020-02-02 13:47:17.052 [main] DEBUG co.elastic.apm.agent.impl.payload.SystemInfo - container ID is null
2020-02-02 13:47:17.070 [main] INFO co.elastic.apm.agent.configuration.StartupInfo - Starting Elastic APM 1.12.0 as mms on Java 1.8.0_231 (Oracle Corporation) Windows 10 10.0
2020-02-02 13:47:17.071 [main] DEBUG co.elastic.apm.agent.configuration.StartupInfo - service_name: 'my-service' (source: path/to/file/
2020-02-02 13:47:17.071 [apm-remote-config-poller] DEBUG co.elastic.apm.agent.configuration.ApmServerConfigurationSource - Reloading configuration from APM Server http://my-apm-server-ip:8200/config/v1/agents
2020-02-02 13:47:17.071 [main] DEBUG co.elastic.apm.agent.configuration.StartupInfo - config_file: 'path/to/file/' (source: Java System Properties)
2020-02-02 13:47:17.071 [main] DEBUG co.elastic.apm.agent.configuration.StartupInfo - server_urls: 'http://my-apm-server-ip:8200' (source: path/to/file/
2020-02-02 13:47:17.071 [main] DEBUG co.elastic.apm.agent.configuration.StartupInfo - application_packages: '' (source: path/to/file/
2020-02-02 13:47:17.071 [main] DEBUG co.elastic.apm.agent.configuration.StartupInfo - span_frames_min_duration: '-1ms' (source: path/to/file/
2020-02-02 13:47:17.071 [main] DEBUG co.elastic.apm.agent.configuration.StartupInfo - log_level: 'DEBUG' (source: path/to/file/
2020-02-02 13:47:17.071 [main] DEBUG co.elastic.apm.agent.configuration.StartupInfo - use_path_as_transaction_name: 'true' (source: path/to/file/

Also, even though the 'use_path_as_transaction_name: true' setting is applied, the transaction name appears as shown below.


How can I represent a transaction name exactly like a url?

Can you look whether there is additional place where you set the span_frames_min_duration config (e.g. system properties or environment variables)?
If you can provide the entire log from startup to the point your application is running some traces, that might help.

From the use_path_as_transaction_name documentation:

If set to true , transaction names of unsupported Servlet API-based frameworks will be in the form of $method $path instead of just $method .

Meaning - since you are using a supported framework, we use that for naming. You need to turn off the instrumentation that captures your traces. See disable_instrumentations on how to do that. For example, if you are using JAX-RS, you need to set disable_instrumentations=jax-rs in addition to use_path_as_transaction_name=true, however, read through all these and understand the implications. You may prefer sticking to the existing names.

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