opentelemetry-cpp icon indicating copy to clipboard operation
opentelemetry-cpp copied to clipboard

[EXPORTER] Allow construct OTLP gRPC exporters from existing `grpc::Channel`

Open owent opened this issue 1 year ago • 1 comments

Is your feature request related to a problem? When we have multiple providers and OTLP gRPC exporters in our application, gRPC will create a lot of threads for each grpc::Channel, especially in a server machine with a lot CPUs.

Describe the solution you'd like Exporting OtlpGrpcClient for users and allow construct all OTLP exporters with shared grpc::Channel.

Additional context

[user00@VM-245-181-centos ~/tgf-server/g-4]$ cat /proc/cpuinfo | grep processor | tail -n 1 | awk '{print $NF+1}'
132
[user00@VM-245-181-centos ~/tgf-server/g-4]$ ps huH -p 107277 | wc
    276    6072   72588

In a system with 132 CPUs, it allocate 250+ threads in just one process with about 4 OTLP gRPC exporters. We have 600+ processes in ours system and the load average is so high.

Can we add a new gRPC options to allow to build OTLP gRPC exporters from existed gRPC Channel? I can take this if this feature is accepted.

owent avatar Jul 23 '24 03:07 owent