diff --git a/src/Honeycomb.OpenTelemetry/Honeycomb.OpenTelemetry.csproj b/src/Honeycomb.OpenTelemetry/Honeycomb.OpenTelemetry.csproj
index 68c3df3..e2de09e 100644
--- a/src/Honeycomb.OpenTelemetry/Honeycomb.OpenTelemetry.csproj
+++ b/src/Honeycomb.OpenTelemetry/Honeycomb.OpenTelemetry.csproj
@@ -35,6 +35,7 @@
+
diff --git a/src/Honeycomb.OpenTelemetry/HoneycombOptions.cs b/src/Honeycomb.OpenTelemetry/HoneycombOptions.cs
index 5981e27..77b0e53 100644
--- a/src/Honeycomb.OpenTelemetry/HoneycombOptions.cs
+++ b/src/Honeycomb.OpenTelemetry/HoneycombOptions.cs
@@ -1,5 +1,6 @@
using Microsoft.Extensions.Configuration;
using OpenTelemetry.Trace;
+using StackExchange.Redis;
using System.Reflection;
using System.Collections.Generic;
@@ -59,6 +60,11 @@ public class HoneycombOptions
///
public string ServiceVersion { get; set; } = s_defaultServiceVersion;
+ ///
+ /// Redis connection to enable Redis instrumentation.
+ ///
+ public IConnectionMultiplexer RedisConnection { get; set; }
+
private static Dictionary CommandLineSwitchMap = new Dictionary
{
{"--honeycomb-apikey", "apikey"},
@@ -93,4 +99,4 @@ public static HoneycombOptions FromConfiguration(IConfiguration configuration)
.Get();
}
}
-}
+}
\ No newline at end of file
diff --git a/src/Honeycomb.OpenTelemetry/TracerProviderBuilderExtensions.cs b/src/Honeycomb.OpenTelemetry/TracerProviderBuilderExtensions.cs
index 0a0d394..10c6c2d 100644
--- a/src/Honeycomb.OpenTelemetry/TracerProviderBuilderExtensions.cs
+++ b/src/Honeycomb.OpenTelemetry/TracerProviderBuilderExtensions.cs
@@ -65,6 +65,11 @@ public static TracerProviderBuilder UseHoneycomb(this TracerProviderBuilder buil
.AddHttpClientInstrumentation()
.AddSqlClientInstrumentation();
+ if (options.RedisConnection != null)
+ {
+ builder.AddRedisInstrumentation(options.RedisConnection);
+ }
+
#if NETSTANDARD2_1
builder.AddGrpcClientInstrumentation();
#endif