open-telemetry / opentelemetry-proto

OpenTelemetry protocol (OTLP) specification and Protobuf definitions
https://opentelemetry.io/docs/specs/otlp/
Apache License 2.0
545 stars 242 forks source link

Fail to push limit #527

Closed gauravmanerkar closed 5 months ago

gauravmanerkar commented 5 months ago

Facing error "Fail to push limit" from google/protobuf after updating the package from 1.0 to 1.1.

May be the root cause lies in this package which uses google/protobuf as dependency.

I am facing the problem on cloud hosting environment and not on local.

The website encountered an unexpected error. Please try again later.

Google\Protobuf\Internal\GPBDecodeException: Error occurred during parsing: Fail to push limit. in Google\Protobuf\Internal\CodedInputStream->pushLimit() (line 340 of /code/vendor/google/protobuf/src/Google/Protobuf/Internal/CodedInputStream.php).
tigrannajaryan commented 5 months ago

Please provide more information about what exactly you are trying to do.

Note that this repository is normally not intended for consumption by OpenTelemetry users. Instead you should use one of the OpenTelemetry language SDKs.

gauravmanerkar commented 5 months ago

Package open-telemetry/gen-otlp-protobuf contains compiled PHP code. When deployed to cloud hosting, the compiled files gets modified (may be by git) and it reports following error-

The website encountered an unexpected error. Please try again later.

Google\Protobuf\Internal\GPBDecodeException: Error occurred during parsing: Fail to push limit. in Google\Protobuf\Internal\CodedInputStream->pushLimit() (line 340 of /code/vendor/google/protobuf/src/Google/Protobuf/Internal/CodedInputStream.php).

Solution: Add.gitattributes with content *.php -text diff for following packages in package root folder . like,

vendor/open-telemetry/.gitattributes
vendor/google/.gitattributes
tigrannajaryan commented 5 months ago

Package open-telemetry/gen-otlp-protobuf contains compiled PHP code.

Where do you get this package from?

gauravmanerkar commented 5 months ago

https://github.com/opentelemetry-php/gen-otlp-protobuf.git

tigrannajaryan commented 5 months ago

It is best to take this to https://github.com/opentelemetry-php which is not part of OpenTelemetry.