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

Prevent propagator packages from throwing fatal error if sdk not installed #1198

Merged
merged 2 commits into from
Dec 24, 2023

Conversation

Nevay
Copy link
Contributor

@Nevay Nevay commented Dec 23, 2023

$ composer init --require open-telemetry/extension-propagator-b3:^1.0 -n && composer u && php vendor/autoload.php
Fatal error: Uncaught Error: Class "OpenTelemetry\SDK\Registry" not found in /php/propagators-fatal-error/vendor/open-telemetry/extension-propagator-b3/_register.php:9
Stack trace:
#0 /php/propagators-fatal-error/vendor/composer/autoload_real.php(41): require()
#1 /php/propagators-fatal-error/vendor/composer/autoload_real.php(45): {closure}('2cea4639ba6ec5b...', '/php/propagator...')
#2 /php/propagators-fatal-error/vendor/autoload.php(25): ComposerAutoloaderInit35b4c2f542c1313891bfa1d737057525::getLoader()
#3 {main}
  thrown in /php/propagators-fatal-error/vendor/open-telemetry/extension-propagator-b3/_register.php on line 9

Also prevents failing for cloudtrace: sdk < 1.0.1 and jaeger: sdk < 1.0.3.
@Nevay Nevay requested a review from a team December 23, 2023 17:15
Copy link

codecov bot commented Dec 23, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (d414999) 84.08% compared to head (c4694f0) 84.08%.
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##               main    #1198   +/-   ##
=========================================
  Coverage     84.08%   84.08%           
  Complexity     2237     2237           
=========================================
  Files           285      285           
  Lines          6359     6359           
=========================================
  Hits           5347     5347           
  Misses         1012     1012           
Flag Coverage Δ
7.4 82.75% <ø> (ø)
8.0 84.01% <ø> (ø)
8.1 84.15% <ø> (ø)
8.2 84.15% <ø> (ø)
8.3 84.15% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4ff6ae4...c4694f0. Read the comment docs.

@brettmc brettmc merged commit bf8119c into open-telemetry:main Dec 24, 2023
12 checks passed
@Nevay Nevay deleted the fix/propagator-sdk-dependency branch December 26, 2023 19:52
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

Successfully merging this pull request may close these issues.

3 participants