Make protobuf requirements more obvious
New users trying out opentelemetry with OTLP exporting are frequently tripped up by not having a protobuf implementation installed, eg https://github.com/open-telemetry/opentelemetry-php/issues/1059#issuecomment-1608692417 , https://github.com/open-telemetry/opentelemetry-php/issues/954#issuecomment-1495137262 and https://github.com/open-telemetry/opentelemetry-php/issues/1045#issuecomment-1604190104
In #949 and #958 we made the protobuf implementation optional, the idea being that the user could choose their implementation but had to provide one.
Possible solutions
- documentation (in opentelemetry.io) It's mentioned in https://github.com/open-telemetry/opentelemetry-php/tree/main/src/Contrib/Otlp#protobuf-runtime-library
- add both to
exporter-otlp'ssuggestsection. People might notice this, but also might not. - add a post-install composer script to exporter-otlp which will complain if no implementation available
- update google-protobuf native package to provide ext-protobuf
https://github.com/protocolbuffers/protobuf/pull/13141 - with this we can require
ext-protobufand have it provided by either native or extension. Getting patches into a released version of protobuf is a long game, though. (edit: is now released in 3.24.0) - require the native implementation and suggest the extension This is what we originally had, and it has the benefit of working out of the box. If you install the extension as well, then it takes priority and will be used.
Initial fix in #1067 which ensures that users always get a protobuf implementation.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.