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

Make protobuf requirements more obvious

Open brettmc opened this issue 2 years ago • 3 comments

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's suggest section. 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-protobuf and 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.

brettmc avatar Jun 27 '23 04:06 brettmc

Initial fix in #1067 which ensures that users always get a protobuf implementation.

brettmc avatar Jul 05 '23 06:07 brettmc

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.

stale[bot] avatar Mar 17 '24 12:03 stale[bot]