-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Reduces overall memory allocation in DynatraceExporterV2 while exporting #3766
Reduces overall memory allocation in DynatraceExporterV2 while exporting #3766
Conversation
@belks Please sign the Contributor License Agreement! Click here to manually synchronize the status of this Pull Request. See the FAQ for frequently asked questions. |
@belks Thank you for signing the Contributor License Agreement! |
2492e56
to
ff9135a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the pull request. @pirgeo let us know if you have any concerns with this change.
@@ -139,9 +136,22 @@ public void export(List<Meter> meters) { | |||
// Lines that are too long to be ingested into Dynatrace, as well as lines that | |||
// contain NaN or Inf values are not returned from "toMetricLines", and are | |||
// therefore dropped. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment should probably also be moved to where toMetricLines
is being called.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Moved the comment closer to toMetricLines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No concerns from my side!
ff9135a
to
3deb668
Compare
3deb668
to
978ed02
Compare
In applications with a lot of metrics the Dynatrace exporter collects all lines to be exported in one list before sending them in batches. This allocates quite a lot of unnecessary memory.
This PR changes this behavior so that batches are sent immediately and already sent lines are not kept in memory.