# \[ElasticAPM\] The limit of 1000 metricsets has been reached, no new metricsets will be created

**URL:** <https://discuss.elastic.co/t/elasticapm-the-limit-of-1000-metricsets-has-been-reached-no-new-metricsets-will-be-created/236729>\
**Category:** APM\
**Tags:** ruby\
**Created:** [June 11, 2020, 2:53pm UTC](https://discuss.elastic.co/t/elasticapm-the-limit-of-1000-metricsets-has-been-reached-no-new-metricsets-will-be-created/236729 "2020-06-11T14:53:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![maxymvlasov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/maxymvlasov/32/22704_2.png) [@maxymvlasov](https://discuss.elastic.co/u/maxymvlasov)\
**Post date:** [June 11, 2020, 2:53pm UTC](https://discuss.elastic.co/t/elasticapm-the-limit-of-1000-metricsets-has-been-reached-no-new-metricsets-will-be-created/236729/1 "2020-06-11T14:53:44Z")

</div>

**Elasticsearch version** :  
7.7.1  
**APM Server version** :  
7.6.2  
**APM Agent language and version** :  
Ruby  
elastic-apm (3.7.0)  
concurrent-ruby (~\> 1.0)  
http (\>= 3.0)

**Description of the problem including expected versus actual behavior. Please include screenshots (if relevant)**:  
I would like understand what is it.

[Here warning in code](https://github.com/elastic/apm-agent-ruby/blob/c03acf6421e51698e2ff27bd885c6396c28e8767/lib/elastic_apm/metrics/set.rb#L77-L78)  
[And constant set](https://github.com/elastic/apm-agent-ruby/blob/c03acf6421e51698e2ff27bd885c6396c28e8767/lib/elastic_apm/metrics/set.rb#L29)

**Provide logs and/or server output (if relevant)**:

```auto
W, [2020-06-10T21:55:16.640015 #91] WARN -- : [ElasticAPM] The limit of 1000 metricsets has been reached, no new metricsets will be created.
W, [2020-06-10T22:13:43.154728 #79] WARN -- : [ElasticAPM] The limit of 1000 metricsets has been reached, no new metricsets will be created.
W, [2020-06-10T22:15:52.308064 #67] WARN -- : [ElasticAPM] The limit of 1000 metricsets has been reached, no new metricsets will be created.
```

---

<div class="post-metadata">

**Author:** ![mikker](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mikker/32/22118_2.png) [@mikker](https://discuss.elastic.co/u/mikker)\
**Post date:** [June 17, 2020, 1:47pm UTC](https://discuss.elastic.co/t/elasticapm-the-limit-of-1000-metricsets-has-been-reached-no-new-metricsets-will-be-created/236729/2 "2020-06-17T13:47:27Z")

</div>

Hi Maksym.

This relates to the metrics and how many distinct metrics keys the agent will record. Every transaction and span kind translate to its own key. If you have many differently named endpoints for example, you'll end up with many different keys.

The limit is there to prevent a case where you'd have infinite keys.

Right now the limit is hardcoded but I suppose it makes sense to make it configurable.

I'll discuss it internally and get back to you.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 8, 2020, 10:00am UTC](https://discuss.elastic.co/t/elasticapm-the-limit-of-1000-metricsets-has-been-reached-no-new-metricsets-will-be-created/236729/3 "2020-07-08T10:00:44Z")

</div>

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