perceptyx / perl-redis-opentracing Goto Github PK
View Code? Open in Web Editor NEWWrap Redis inside OpenTracing
License: Artistic License 2.0
Wrap Redis inside OpenTracing
License: Artistic License 2.0
Currently, it reports as the current package, 'Redis::OpenTracing', but it would be better off if it shows the actual name of the real client.
Test do fail at some smoke testing environments. This is due to a outdated version of Test::MockObject
. Our mocked Test::Mock::Redis::NoOp
Redis client uses a feature to mock several methods with one single mock
call.
We can approach this two ways:
My personal preference is changing the code to allow it to run on platforms with older dependencies, unless there are buck in one of those (like we had with some releases of OpenTracing)
It would be nice to see where the Redis calls are made from, what file / package / subroutine / line-number.
Although, it may be very likely that in larger applications, Redis calls are obfuscated away in a more generic package.
This module should relay any failures it gets from Redis into the active Span. This helps to detect errors, rather then letting failing spans continue silently.
Lazy building is nice for 'lazy' developers, but would postpone errors to show up at runtime, rather than compile time for missing Redis clients.
On could hope that some Redis client would be lately build, but what if the needed Redis (or Fast) module would not be installed.
Making redis
a required attribute, at least makes it clear in the caller application/module what to use/inject and not hope for magic to happen.
Currently there are to ways to call Redis::OpenTracing->new
. With a dependency injected redis
parameter, or use the default Redis
client.
Wouldn't it be nice that it would use Redis::Fast
instead?
It would be great to see if a Redis call was a hit, or if the key/value pair did result in nothing at all.
This would of course only work for GET and alike commands.
The following does not work for Redis::Fast
return "@{[ $self->redis->{ server } ]}"
if exists $self->redis->{ server };
# currently, we're fine with any stringification of a blessed hashref too
# but for Redis, Redis::Fast, Test::Mock::Redis, this is just a string
The 'thing' stored in redis
is not always a hash (although it should be an Object
).
Possibly check what Redis client is really use and make separate logic for each known client ?
We have a weird error, but not entirely sure where it is exactly coming from:
Error message:
Usage: Redis::Fast::__quit(self) at /opt/perl/perls/perl-5.28.1/lib/site_perl/5.28.1/amd64-freebsd-thread-multi/Redis/Fast.pm line 319.
Being publicly available, it should be more easy to find resources, where the git-repository can be found and where issues can be reported etc.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.