Skip to content

Latest commit

 

History

History
33 lines (23 loc) · 1.11 KB

File metadata and controls

33 lines (23 loc) · 1.11 KB

StackExchange.Redis Instrumentation for OpenTelemetry .NET

NuGet NuGet

Automatically instruments the outgoing calls to Redis made using StackExchange.Redis library.

Installation

dotnet add package OpenTelemetry.Instrumentation.StackExchangeRedis

Configuration

// Connect to the server.
using var connection = ConnectionMultiplexer.Connect("localhost:6379");

// Pass the connection to AddRedisInstrumentation.
using var openTelemetry = Sdk.CreateTracerProvider(b => b
    .AddRedisInstrumentation(connection)
    .AddZipkinExporter()
    .SetResource(Resources.CreateServiceResource("my-service"));

For a more detailed example see TestRedis.

References