How do I apply Elastic.Apm.StackExchange.Redis to Microsoft's IDistributedCache?

Like the title says, how do I apply Elastic.Apm.StackExchange.Redis to Microsoft's IDistributedCache?
The package exposes an UseElasticApm extension method to IConnectionMultiplexer, but the IDistributedCache creates its own multiplexer, and doesn't expose it.

APM Agent language and version: dotnet 1.12.1

Original install method (e.g. download page, yum, deb, from source, etc.) and version: NuGet

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Unfortunately, it's not possible to get at the underlying IConnectionMultiplexer in Microsoft.Extensions.Caching.StackExchangeRedis 5.x.

It is however possible in 6.x, using RedisCacheOptions.ConnectionMultiplexerFactory: