This is a cache of https://www.elastic.co/guide/en/apm/agent/dotnet/current/setup-stackexchange-redis.html. It is a snapshot of the page at 2024-04-06T01:42:19.889+0000.
StackExchange.Redis | APM .NET Agent Reference [1.x] | Elastic

StackExchange.Redisedit

Quick startedit

Instrumentation can be enabled for StackExchange.Redis by referencing Elastic.Apm.StackExchange.Redis package and calling the UseElasticApm() extension method defined in Elastic.Apm.StackExchange.Redis, on IConnectionMultiplexer

// using Elastic.Apm.StackExchange.Redis;

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

A callback is registered with the IConnectionMultiplexer to provide a profiling session for each transaction and span that captures redis commands sent with IConnectionMultiplexer.