-
Notifications
You must be signed in to change notification settings - Fork 173
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
Question: Promisified libraries #106
Comments
I believe promisifying code shouldn't have any effect on zipkin instrumentation at all. Does it stop it from working? |
I have only tried it for redis @eirslett. From going through the instrumentation code I'm pretty sure why it doesn't work. In the case of redis, using Bluebird to promisify it creates new methods with the When I call an async redis method zipkin throws an error:
For the |
It's correct that Bluebird adds promisified methods |
@eirslett That's correct for request-promise, I've successfully managed to trace calls using the same wrapper for request. But for redis, it's not working. The stack trace I posted above was from an error using zipkin-instrumentation-redis with a Bluebird promisified node-redis. |
:-( Just to reproduce, can you add an integration test? |
Sure, I'll add the tests. |
I also see this zipkin error if a wrapped redis command does not have a callback. Even though the node_redis documentation explicitly says "the API is entirely asynchronous," there is still a check in there to see if a callback exists. Perhaps doing a similar thing here would be helpful to stay consistent with the node_redis api. |
I've successfully integrated zipkin on some of our services. In most of them we are using Bluebird to promisify the
redis.RedisClient
and we are usingrequest-promise
for external service request, which also uses Bluebird internally.What is the best approach to wrapping a promisified
redisClient
andrequest-promise
? Should we use thezipkin-instrumentation-redis
andzipkin-instrumentation-request
packages and then promisify them? Or should we create our own instrumentation packages that support Promises?The text was updated successfully, but these errors were encountered: