-
Notifications
You must be signed in to change notification settings - Fork 91
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
Exclude ApiPlatform test HttpClient from instrumentation #235
Conversation
If the pre hook doesn't start+activate a span, then the post hook could potentially deactivate some other scope, couldn't it? If so, might it be safer to create, activate and then end a span here so that the post hook works as expected? (I don't have access to a pc to actually test this, though) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the pre
hook should be unchanged, and the active span closed in the post
callback if the client doesn't support on_progress. This way, a span is still created and activated in pre
hook, and post
hook cannot detach the wrong scope (which I'm pretty sure it will do, with this change).
@cedricziel - are you still planning on working on this PR? |
We also just ran into this issue, but also ran into when using prophecy to mock the
|
The problem is that Symfony will evaluate the $options array and will fail if the client doesn't support one of the provided options. I'm adapting the instrumentation so that if will create a span, but need to close it manually in post hook as the callback method won't work. |
I think the AMQP error is unrelated... |
The client doesn't support the `on_progress` option.
Co-authored-by: Tobias Bachert <git@b-privat.de>
rebased. Unrelated style issues |
The client doesn't support the
on_progress
option and makes tests fail that use the ApiPlatform test clientLonger term we should probably maintain a blacklist or level up this instrumentation significantly so we know the allowed options