-
Notifications
You must be signed in to change notification settings - Fork 534
[8.19] (backport #17512) monitoring: update apm-server metrics collection to avoid conflicts #17525
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Cherry-pick of f1c279b has failed:
To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally |
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
This pull request has been removed from the queue for the following reason: The merge conditions cannot be satisfied due to failing checks: You may have to fix your CI before adding the pull request to the queue again. |
@Mergifyio queue |
🛑 The pull request has been removed from the queue
|
This pull request has not been merged yet. Could you please review and merge it @isaacaflores2? 🙏 |
@Mergifyio update |
✅ Branch has been successfully updated |
Motivation/summary
Currently
apm-server.sampling.tail.storage.lsm_size
andapm-server.sampling.tail.dynamic_service_groups
are never reported together.Testing locally this is caused because both sets of metrics use the same namespace (metric name prefix)
apm-server.sampling
but they are created using different instances of a Meter.The related monitoring func calls
addAPMServerMetrics
multiple times for each scoped metric. Metric names with the same prefix in different scopes are somehow overwriting each other. This approach opts to collect all "apm-server" metrics and add them to the snapshot once. Another approach would be to update theelastic-agent-lib
to prevent metrics from overwriting each other.Checklist
For functional changes, consider:
How to test these changes
manual test
./sendotlp -insecure -endpoint=http://localhost:8200 -secret-token=<token>
storage
should be visible along with other metrics underapm-server.sampling.tail
Related issues
Closes #17342
Alternate approach to #17427
This is an automatic backport of pull request #17512 done by [Mergify](https://mergify.com).