StackExchange.Redis
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
.