# Does span\_frames\_min\_duration config apply?

**URL:** <https://discuss.elastic.co/t/does-span-frames-min-duration-config-apply/378493>\
**Category:** APM\
**Tags:** ruby\
**Created:** [May 24, 2025, 9:57pm UTC](https://discuss.elastic.co/t/does-span-frames-min-duration-config-apply/378493 "2025-05-24T21:57:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Khaled\_Muamar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/khaled_muamar/32/143295_2.png) [@Khaled\_Muamar](https://discuss.elastic.co/u/Khaled_Muamar)\
**Post date:** [May 24, 2025, 9:57pm UTC](https://discuss.elastic.co/t/does-span-frames-min-duration-config-apply/378493/1 "2025-05-24T21:57:18Z")

</div>

We attempted to increase the value of the span\_frames\_min\_duration , but it appears the agent is not honouring the configuration—we're still receiving spans shorter than the configured threshold.

**Note:** We're setting the value exclusively via environment variables.  
`ELASTIC_APM_SPAN_FRAMES_MIN_DURATION`

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [May 24, 2025, 11:44pm UTC](https://discuss.elastic.co/t/does-span-frames-min-duration-config-apply/378493/2 "2025-05-24T23:44:04Z")

</div>

Hi @Khaled_Muamar

Please provide the following

Elastic Stack Version  
Which Client Language  
APM Agent version  
Full Agent Configuration  
Instrumentation Approach

---

<div class="post-metadata">

**Author:** ![Sylvain\_Juge](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sylvain_juge/32/55521_2.png) [@Sylvain\_Juge](https://discuss.elastic.co/u/Sylvain_Juge)\
**Post date:** [May 26, 2025, 2:27pm UTC](https://discuss.elastic.co/t/does-span-frames-min-duration-config-apply/378493/3 "2025-05-26T14:27:04Z")

</div>

> [@Khaled\_Muamar](#):
>
> ELASTIC\_APM\_SPAN\_FRAMES\_MIN\_DURATION

This configuration does not exist, maybe what you meant to use is [`span_min_duration`](https://www.elastic.co/docs/reference/apm/agents/java/config-core#config-span-min-duration) ?

The agent logs the effective configuration in the first few lines of the agent log, you should check that the values that you have configured are properly set by checking if they are visible in those log lines, unsupported configurations are silently ignored.

---

<div class="post-metadata">

**Author:** ![Khaled\_Muamar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/khaled_muamar/32/143295_2.png) [@Khaled\_Muamar](https://discuss.elastic.co/u/Khaled_Muamar)\
**Post date:** [May 28, 2025, 12:47pm UTC](https://discuss.elastic.co/t/does-span-frames-min-duration-config-apply/378493/4 "2025-05-28T12:47:43Z")

</div>

We are using **Elastic Serverless** and instrumenting our **Rails applications** with the `elastic-apm"` gem.  
Our configuration follows the guidelines provided in the below documentation.

> **[Configuration | Elastic Documentation](https://www.elastic.co/docs/reference/apm/agents/ruby/configuration#config-span-frames-min-duration-ms)**
>
> There are several ways to configure how Elastic APM behaves. We recommend using a config/elastic\_apm.yml file: Some options can be set with ENV variables...
