elastic / elastic/apm-agent-php
Call to undefined method : NoopLogSink::singletonInstance()
- Dominant language
- PHP
- Stars
- 268
- Forks
- 86
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
In this file we call the method `singletonInstance()` of NoopLogSink, but it doesn't exist.
https://github.com/elastic/apm-agent-php/blob/6548eadaf42c6b2ef6dae8344b4ac4e45fcd4f69/agent/php/ElasticApm/Impl/Log/NoopLoggerFactory.php#L45
**To Reproduce**
We had an error that trigger the stack trace from Elastic and this error showed up. Here's the full stack trace we had concerning Elastic APM :
```
/opt/elastic/apm-agent-php/src/ElasticApm/Impl/Log/LoggableStackTrace.php line 62 → Elastic\Apm\Impl\Log\NoopLoggerFactory::singletonInstance()
/opt/elastic/apm-agent-php/src/ElasticApm/Impl/Log/SinkBase.php line 59 → Elastic\Apm\Impl\Log\LoggableStackTrace::buildForCurrent(integer)
/opt/elastic/apm-agent-php/src/ElasticApm/Impl/Log/Backend.php line 129 → Elastic\Apm\Impl\Log\SinkBase->consume(integer, string, array, string, string, integer, string, null, integer)
/opt/elastic/apm-agent-php/src/ElasticApm/Impl/Log/EnabledLoggerProxy.php line 107 → Elastic\Apm\Impl\Log\Backend->log(integer, string, array, integer, string, Elastic\Apm\Impl\Log\LoggerData, null, integer)
/opt/elastic/apm-agent-php/src/ElasticApm/Impl/AutoInstrument/InterceptionManager.php line 120 → Elastic\Apm\Impl\Log\EnabledLoggerProxy->logThrowable(Error, string)
/opt/elastic/apm-agent-php/src/ElasticApm/Impl/AutoInstrument/PhpPartFacade.php line 166 → Elastic\Apm\Impl\AutoInstrument\InterceptionManager->internalFuncCallPreHook(integer, PDOStatement, array)
[internal function] → Elastic\Apm\Impl\AutoInstrument\PhpPartFacade::internalFuncCallPreHook(integer, PDOStatement, array)
```
**Expected behavior**
This method should not be called as it doesn't exist ?
Thanks !
Contributor guide
Assessment
This issue has not been assessed yet.