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

Use sync.Pools in otlploghttp transforms #5196

Open
MrAlias opened this issue Apr 11, 2024 · 2 comments
Open

Use sync.Pools in otlploghttp transforms #5196

MrAlias opened this issue Apr 11, 2024 · 2 comments
Assignees
Labels
area:logs Part of OpenTelemetry logs pkg:exporter:otlp Related to the OTLP exporter package

Comments

@MrAlias
Copy link
Contributor

MrAlias commented Apr 11, 2024

Could we use sync.Pools to reduce the amount of heap allocation?
E.g. ResourceLogs could return a functions that would return the pooled maps and slices back to their pools.

If you think that it is possible and it is a good idea then this should be tracked as a separate issue.

Originally posted by @pellared in #5191 (comment)

@MrAlias MrAlias added area:logs Part of OpenTelemetry logs pkg:exporter:otlp Related to the OTLP exporter package labels Apr 11, 2024
@hiroyaonoe
Copy link

I want to work on this!
Should I update ScopeLogs as well?

func ScopeLogs(records []log.Record) []*lpb.ScopeLogs {

@MrAlias
Copy link
Contributor Author

MrAlias commented Apr 18, 2024

I want to work on this! Should I update ScopeLogs as well?

func ScopeLogs(records []log.Record) []*lpb.ScopeLogs {

I would start by only pooling the maps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:logs Part of OpenTelemetry logs pkg:exporter:otlp Related to the OTLP exporter package
Projects
Status: In Progress
Development

No branches or pull requests

2 participants