Skip to content

Instantly share code, notes, and snippets.

@bennettandrews
Created June 27, 2012 19:41
Show Gist options
  • Save bennettandrews/3006312 to your computer and use it in GitHub Desktop.
Save bennettandrews/3006312 to your computer and use it in GitHub Desktop.
RedisTracingFilter
private class RedisTracingFilter extends SimpleFilter[Command, Reply] {
override def apply(command: Command, service: Service[Command, Reply]) = Trace.unwind {
Trace.recordRpcname("redis", command.command)
Trace.record(Annotation.ClientSend())
service(command) map { response =>
Trace.record(Annotation.ClientRecv())
response
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment