Skip to content
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

Excessive memory allocation in OTel broker metrics #22817

Closed
asafm opened this issue Jun 1, 2024 · 3 comments · Fixed by #22876
Closed

Excessive memory allocation in OTel broker metrics #22817

asafm opened this issue Jun 1, 2024 · 3 comments · Fixed by #22876

Comments

@asafm
Copy link
Contributor

asafm commented Jun 1, 2024

          @dragosvictor @merlimat Please note this contradicts all the work done to eliminate memory allocation. 

The Attributes for each topic should be persisted either in a Map or easier by saving it in the implementation of Topic interface you're getting. Then you simply retrieve it by topic.getTopicOTelAttributes().
When you are not doing it, you are creating a memory allocation each time you run collect, for each topic. This is exactly what I was set out to avoid in the whole implementation rework of OpenTelemetry Java SDK memory mode.

Originally posted by @asafm in #22467 (comment)

@asafm
Copy link
Contributor Author

asafm commented Jun 1, 2024

@dragosvictor Can you please take a look?
@eolivelli

@lhotari
Copy link
Member

lhotari commented Jun 5, 2024

Fixed by #22837

@lhotari lhotari closed this as completed Jun 5, 2024
@dragosvictor
Copy link
Contributor

@lhotari Working on the same improvement for the topic stats, can you please reopen this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants