-
Notifications
You must be signed in to change notification settings - Fork 160
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
Error handling exceptions with the Noop Tracer #216
Comments
Awesome, that was quick 😄. Thanks! |
@jshayes did the fix work for you? |
@labbati Yes it did 😄, thanks. The only thing that concerns me about it is that before the boot method would still run during my tests, which would register all the |
@jshayes thanks for confirming that your issue is now gone. On a different topic I see what you mean and currently we do not offer a way for you to test your code . with our integrations enabled, but we should. You made a very good point. Supporting this on our side would be not too complicated. The reason why integrations don't get loaded is because is we detect the execution is of type This, in addition to use the What do you thing? Would it work for you? |
I was initially looking at setting the env to |
This should have been fixed in 0.10.0 because we've migrated away from requiring OpenTracing API. As for allowing running the integrations in more |
I have received the following error in some of my tests.
When my tests are run, php is running as a cli, as a result the tracer is not registered in the service provider. I am using Laravel, and one of my tests hits a route and in that particular flow an exception is thrown in my application and bubbles up to the exception handler. It seems like this exception causes an issue with some of the registered trace functions as the
setError
method is missing.It looks like in
DDTrace\Integrations\Laravel\V5\LaravelProvider
, if php is running in cli it will not run the register method, but it will still run the boot method. So, no tracer is created, and it seems to default to theOpenTracing\Tracer
. I noticed that there is a way to create a noop tracer in theDDTrace\Tracer
class, but if I register that tracer in the case where php is run as a cli, I get the following errorSo, it seems like both of the noop tracers are missing some methods.
The text was updated successfully, but these errors were encountered: