问题描述
我有一个使用SpringBoot和Spring Cache Abstraction构建的应用程序,通过Lettuce使用Redis。 我需要通过APM AppDynamics工具进行监视,但是默认情况下,它仅从Jedis获取数据。 我可以在AppDynamics中创建一个出口点,但是我需要确切地知道哪个类和方法负责打开连接并执行到REDIS的命令。 谁能帮我解决这个问题?
解决方法
我必须创建自定义退出点来收集指标/数据。
转到您的控制器: 远程服务 > 配置 > 您的或层 > 自定义出口点 > 添加
并创建 2 个自定义退出点,如下所示:
Name: REDIS GET (Lettuce)
Type: Cache
Is High Volume: true
Class [with a Class Name that] equals: io.lettuce.core.AbstractRedisAsyncCommands
Method Name: get
Name: REDIS SET (Lettuce)
Type: Cache
Is High Volume: true
Class [with a Class Name that] equals: io.lettuce.core.AbstractRedisAsyncCommands
Method Name: set