-
Notifications
You must be signed in to change notification settings - Fork 1.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
Use sync.Pools in otlplog transforms #5196
Comments
I want to work on this!
|
I would start by only pooling the maps. |
Part of #5196 ### Benchmarks ```console goos: linux goarch: amd64 pkg: go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp/internal/transform cpu: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz │ old.txt │ new.txt │ │ sec/op │ sec/op vs base │ ResourceLogs-8 6.033µ ± 4% 5.249µ ± 8% -13.00% (p=0.000 n=10) │ old.txt │ new.txt │ │ B/op │ B/op vs base │ ResourceLogs-8 10.602Ki ± 0% 8.299Ki ± 0% -21.72% (p=0.000 n=10) │ old.txt │ new.txt │ │ allocs/op │ allocs/op vs base │ ResourceLogs-8 188.0 ± 0% 178.0 ± 0% -5.32% (p=0.000 n=10) ```
This needs to be applied at to the template to address both HTTP and gRPC: https://github.com/open-telemetry/opentelemetry-go/tree/main/internal/shared/otlp/otlplog/transform |
Hi @MrAlias, I am working on an application that collects logs from a kubernetes node and we plan to export these logs to OpenTelemetry Collector using go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp. When the log frequency increases, I've observed a dramatic increase in the cpu usage of my application. Got the cpu profile, and it seems related to this issue. Seems like too much allocation is made and that keeps the GC under pressure. |
Originally posted by @pellared in #5191 (comment)
The text was updated successfully, but these errors were encountered: