Skip to content

Require sem-conv >= 1.38 to prevent fatal errors from missing classes#1903

Open
ste93cry wants to merge 1 commit intoopen-telemetry:mainfrom
ste93cry:bump-minimum-sem-conv-package-version
Open

Require sem-conv >= 1.38 to prevent fatal errors from missing classes#1903
ste93cry wants to merge 1 commit intoopen-telemetry:mainfrom
ste93cry:bump-minimum-sem-conv-package-version

Conversation

@ste93cry
Copy link
Copy Markdown

This PR updates the composer.json constraint for opentelemetry-php/sem-conv to require version 1.38. The HostIncubatingAttributes and OsIncubatingAttributes classes used by the Host resource detector were introduced in #1659 and first used in #1855. If a project upgrades the SDK while sem-conv remains outdated, it can lead to fatal errors when the detector tries to load classes that aren't available. This is exactly what happened in my case: Renovate updated the SDK because it was required in the project’s root composer.json, but sem-conv was only a transitive dependency and was therefore ignored, leaving an incompatible version installed.

Fatal error: Uncaught Error: Class "OpenTelemetry\SemConv\Incubating\Attributes\HostIncubatingAttributes" not found
in /var/www/app/vendor/open-telemetry/sdk/Resource/Detectors/Host.php:38

While version 1.36 technically contains the required classes, the SDK calls ResourceInfo::create with version 1.38, so I updated the requirement to that version to stay consistent with what the SDK expects.

@ste93cry ste93cry requested a review from a team as a code owner March 14, 2026 16:45
Comment thread src/SDK/composer.json Outdated
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.27%. Comparing base (e5a33a4) to head (6676c86).
⚠️ Report is 19 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##               main    #1903      +/-   ##
============================================
- Coverage     68.35%   68.27%   -0.08%     
  Complexity     3009     3009              
============================================
  Files           449      449              
  Lines          8798     8798              
============================================
- Hits           6014     6007       -7     
- Misses         2784     2791       +7     
Flag Coverage Δ
8.2 68.20% <ø> (-0.13%) ⬇️
8.3 68.25% <ø> (+0.02%) ⬆️
8.4 ?
8.5 67.38% <ø> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 5 files with indirect coverage changes


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 e5a33a4...6676c86. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ste93cry ste93cry force-pushed the bump-minimum-sem-conv-package-version branch from 29a215c to 6676c86 Compare March 20, 2026 15:10
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.

2 participants