加载中

设置 StackExchange.Redis 插桩

软件包 支持的版本
StackExchange.Redis ≥2.0.495 <3.0.0

有关包括支持的安装方法在内的完整兼容性矩阵,请参考 数据访问技术

本页假设核心代理已设置完毕。如果尚未设置,请先参阅 设置 APM .NET 代理

Elastic.Apm.StackExchange.Redis NuGet 包添加到您的项目中

dotnet add package Elastic.Apm.StackExchange.Redis
		

在您的 IConnectionMultiplexer 上调用 UseElasticApm() 扩展方法

using Elastic.Apm.StackExchange.Redis;

var connection = await ConnectionMultiplexer.ConnectAsync("<redis connection>");
connection.UseElasticApm();
		

IConnectionMultiplexer 注册一个回调,为每个事务和跨度提供性能分析会话,以捕获使用 IConnectionMultiplexer 发送的 redis 命令。

© . This website operates independently and is not affiliated with or endorsed by Elasticsearch B.V. All brand names, logos, and trademarks are the property of their respective owners.