-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
otlpreceiver: performance issue about otlpreceiver invoke proto.Size slow path #6947
Comments
Hi Jimmie! I'm not sure familiar with this code, but maybe I can help? What is the fast path that you were thinking of? How should it work instead? Also, is this the right repository for this issue? It seems like the problematic code lives in open-telemetry/opentelemetry-go, and the problematic call lives in golang/protobuf. |
hi @gbbr , thank your reply.
I think it shoud try get size from asserting interface Size() int, then try to use proto.Size
opentelemetry-collector use gogoprotobuf, but opentelemetry-go-contrib use golang/profobuf. it happens in otlpreceiver, so i create issue in this repository, I have open a issue to opentelemetry-go-contrib repository just now. |
Thanks for clarifying. I think that makes sense. I would update the "What did you expect to see?" in the Description of the issue to say that. |
Is this fixed with open-telemetry/opentelemetry-go-contrib#3168? |
fixed. close it . |
Describe the bug
The otlpreceiver consume lots of cpu for
proto.Size
, marshal to buffer, get buffer size.Here is the pprof:
Code:
opentelemetry-collector/config/configgrpc/configgrpc.go
Lines 266 to 267 in f2a0133
Steps to reproduce
Run collector with otlp receiver.
What did you expect to see?
Use fast path to get size of proto message.
What did you see instead?
slow path to get size of proto message, marshal to buffer, get buffer size.
What version did you use?
v0.59.0
What config did you use?
Environment
OS: Linux
Compiler: Go 1.19
Additional context
The text was updated successfully, but these errors were encountered: