Skip to content

Add trigger_error as Log Destination Option#1939

Open
SoulofAkuma wants to merge 1 commit intoopen-telemetry:mainfrom
SoulofAkuma:main
Open

Add trigger_error as Log Destination Option#1939
SoulofAkuma wants to merge 1 commit intoopen-telemetry:mainfrom
SoulofAkuma:main

Conversation

@SoulofAkuma
Copy link
Copy Markdown

This PR adds trigger_error as an additional option for OTEL_PHP_LOG_DESTINATION.

I will add a corresponding PR to https://github.com/open-telemetry/opentelemetry.io to document this new option and will reference this PR here as soon as that is done.

Fixes #1473

@SoulofAkuma SoulofAkuma requested a review from a team as a code owner April 19, 2026 13:02
@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla Bot commented Apr 19, 2026

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: SoulofAkuma / name: Mika Allert (da9f2d8)

@SoulofAkuma
Copy link
Copy Markdown
Author

I'm gonna have to double check whether I classify as an individual or corporate contributor in this scenario. I am participating in the bloomberg open source series with OTel.

@SoulofAkuma
Copy link
Copy Markdown
Author

Submitted corressponding documentation update: open-telemetry/opentelemetry.io#9685

LoggerHolder::set($this->createMock(LoggerInterface::class));
$this->assertInstanceOf(Psr3LogWriter::class, (new LogWriterFactory())->create());
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✂️

Suggested change

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 20, 2026

Codecov Report

❌ Patch coverage is 50.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 68.12%. Comparing base (40d751e) to head (da9f2d8).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...avior/Internal/LogWriter/TriggerErrorLogWriter.php 0.00% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##               main    #1939      +/-   ##
============================================
+ Coverage     68.10%   68.12%   +0.01%     
- Complexity     3021     3023       +2     
============================================
  Files           450      451       +1     
  Lines          8820     8824       +4     
============================================
+ Hits           6007     6011       +4     
  Misses         2813     2813              
Flag Coverage Δ
8.1 67.83% <50.00%> (-0.07%) ⬇️
8.2 68.05% <50.00%> (+0.01%) ⬆️
8.3 68.01% <50.00%> (-0.05%) ⬇️
8.4 68.02% <50.00%> (-0.06%) ⬇️
8.5 67.27% <50.00%> (+0.02%) ⬆️

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

Files with missing lines Coverage Δ
src/API/Behavior/Internal/LogWriterFactory.php 80.95% <100.00%> (+2.00%) ⬆️
...avior/Internal/LogWriter/TriggerErrorLogWriter.php 0.00% <0.00%> (ø)

... and 2 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 40d751e...da9f2d8. Read the comment docs.

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

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.

To use trigger_error instead of error_log

2 participants