Make the metric set limit configurable (#2147)#2148
Conversation
|
I did not add this feature to the changeling/documentation because |
|
@felixbarny What is your opinion? |
|
ping |
2 similar comments
|
ping |
|
ping |
apm-agent-core/src/main/java/co/elastic/apm/agent/configuration/CoreConfiguration.java
Outdated
Show resolved
Hide resolved
apm-agent-core/src/main/java/co/elastic/apm/agent/configuration/CoreConfiguration.java
Outdated
Show resolved
Hide resolved
apm-agent-core/src/main/java/co/elastic/apm/agent/metrics/MetricRegistry.java
Outdated
Show resolved
Hide resolved
apm-agent-core/src/main/java/co/elastic/apm/agent/configuration/CoreConfiguration.java
Outdated
Show resolved
Hide resolved
| return metricSet; | ||
| } | ||
| if (activeMetricSets.size() < METRIC_SET_LIMIT) { | ||
| if (activeMetricSets.size() < coreConfiguration.getMetricSetLimit()) { |
There was a problem hiding this comment.
This is a bit misleading as it means that the limit can be dynamically updated. However, since metricsets are typically registered only once per startup, modifying this at runtime will only take affect on not-yet registered metrics.
Please keep the limit as a final field initialized through construction, so that it's more obvious and predictive.
apm-agent-core/src/test/java/co/elastic/apm/agent/metrics/builtin/CGroupMetricsTest.java
Outdated
Show resolved
Hide resolved
It should be added to the CHANGELOG, but no need to document it indeed. |
|
run integration tests |
apm-agent-core/src/main/java/co/elastic/apm/agent/metrics/MetricRegistry.java
Outdated
Show resolved
Hide resolved
…icRegistry.java Co-authored-by: eyalkoren <41850454+eyalkoren@users.noreply.github.com>
|
run elasticsearch-ci/docs |
|
Thank You! |
|
If this is documented in the changelog it is in fact documented, the changelog is part of the documentation. If it is an "internal option" (whatever that is), why is there an option for it? If the user is not supposed to set the option, who is? This can't be a fix for #2147 if the user that need to set it can't find it. If it is unsupported it can't be fix for a user bug. Please document this properly. |
|
Yes you are right. "internal" doesn't actually mean it's not for users - the agent is fully open sourced so anyone can see what is there and use any option. "internal" is shorthand for "this option is an edge case that affects very few users but enough for us to add it, but we're not sure it's helpful to add it in the public documentation because too many rarely needed options makes for extra confusion" But I agree in this case it's better to document it in the public documentation, and will do so. Thank you for your feedback! |
What does this PR do?
Fixes #2147
Checklist