Stacktrace configuration options
editStacktrace configuration options
editapplication_packages
editUsed to determine whether a stack trace frame is an in-app frame or a library frame. This allows the APM app to collapse the stack frames of library code, and highlight the stack frames that originate from your application. Multiple root packages can be set as a comma-separated list; there’s no need to configure sub-packages. Because this setting helps determine which classes to scan on startup, setting this option can also improve startup time.
You must set this option in order to use the API annotations @CaptureTransaction
and @CaptureSpan
.
Example
Most Java projects have a root package, e.g. com.myproject
. You can set the application package using Java system properties:
-Delastic.apm.application_packages=com.myproject
If you are only interested in specific subpackages, you can separate them with commas:
-Delastic.apm.application_packages=com.myproject.api,com.myproject.impl
the instrumentation aspect of this configuration option - specifying which classes to scan - only applies at startup of the agent and changing the value later won’t affect which classesgot scanned. The UI aspect, showing where stack frames can be collapsed, can be changed at any time.
Default | Type | Dynamic |
---|---|---|
|
Collection |
true |
Java System Properties | Property file | Environment |
---|---|---|
|
|
|
stack_trace_limit
(performance)
editSetting it to 0 will disable stack trace collection. Any positive integer value will be used as the maximum number of frames to collect. Setting it -1 means that all frames will be collected.
Default | Type | Dynamic |
---|---|---|
|
Integer |
true |
Java System Properties | Property file | Environment |
---|---|---|
|
|
|
span_stack_trace_min_duration
(performance)
editWhile this is very helpful to find the exact place in your code that causes the span, collecting this stack trace does have some overhead.
When setting this option to value 0ms
, stack traces will be collected for all spans. Setting it to a positive value, e.g. 5ms
, will limit stack trace collection to spans with durations equal to or longer than the given value, e.g. 5 milliseconds.
To disable stack trace collection for spans completely, set the value to -1ms
.
Supports the duration suffixes ms
, s
and m
.
Example: 5ms
.
Default | Type | Dynamic |
---|---|---|
|
TimeDuration |
true |
Java System Properties | Property file | Environment |
---|---|---|
|
|
|