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

Issue related to protobuf for opentelemetry c++ #19762

Open
pallavibhingarkar opened this issue Dec 20, 2024 · 0 comments
Open

Issue related to protobuf for opentelemetry c++ #19762

pallavibhingarkar opened this issue Dec 20, 2024 · 0 comments

Comments

@pallavibhingarkar
Copy link

After integrated CPP opentelemetry libs with our dlls we are getting below error:

[libprotobuf ERROR D:\workdir\source\opentelemetry-cpp\tools\vcpkg\buildtrees\protobuf\src\23fa7edd52-47d9944e09.clean\src\google\protobuf\descriptor_database.cc:641] File already exists in database: opentelemetry/proto/common/v1/common.proto
[libprotobuf FATAL D:\workdir\source\opentelemetry-cpp\tools\vcpkg\buildtrees\protobuf\src\23fa7edd52-47d9944e09.clean\src\google\protobuf\descriptor.cc:1371] CHECK failed: GeneratedDatabase()->Add(encoded_file_descriptor, size):

I have 2 dll integrated with opentelemetry APIs. If I am testing single dll, it is working fine but with both dlls in place while testing I am getting above error.

I guess this issue coming as with more that one dll, protobuf database is trying to initialize twice.
Is there any way to get this initialized once only.

Please note our end users for openetelemetry are dlls which would not link protobuf static libs.

Here are steps to reproduce:

Clone opentelmetry git repo
Instrument for http exporter
Create 2 different dlls which will use opentelemetry APIs
Create application which will use API from above 2 dlls
Run the application

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

No branches or pull requests

1 participant