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

Laravel. Add ability to disable logger watcher from open-telemetry/opentelemetry-auto-laravel. #1424

Open
GDXbsv opened this issue Oct 31, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@GDXbsv
Copy link

GDXbsv commented Oct 31, 2024

open-telemetry/opentelemetry-auto-laravel 1.0.0

Steps to reproduce
Install open-telemetry/opentelemetry-auto-laravel 1.0.0
And activate open-telemetry/opentelemetry-logger-monolog

final class LaravelLoggerCreating
{
    public function __invoke(array $config)
    {
       $log = new Logger('test');
       $otelHandler = new Handler(
            Globals::loggerProvider(),
            LogLevel::INFO
        );
        $log->pushHandler($otelHandler);
        
        return $log;
     }
}
    'channels' => [
        'app' => [
            'driver' => 'custom',
            'via' => new LaravelLoggerCreating(),
            'app_name' => 'Test',
            'channel' => 'test',
            'processors' => [],
            'level' => Logger::INFO,
        ],

What is the expected behavior?
I would expect an ability to use my own custom logger as it is described in docs.

What is the actual behavior?
I see logs from open-telemetry/opentelemetry-auto-laravel 1.0.0 and from my logger (they are doubled actually)

@GDXbsv GDXbsv added the bug Something isn't working label Oct 31, 2024
@ChrisLightfootWild
Copy link
Contributor

There's no mechanism yet to allow disabling parts of the instrumentation, but this is something to consider on the back of #1422 - and that's coincidentally very close to what I'd like as part of "the future".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants