opentelemetry-dotnet-instrumentation icon indicating copy to clipboard operation
opentelemetry-dotnet-instrumentation copied to clipboard

[kafka] duck typing improvements

Open lachmatt opened this issue 1 year ago • 0 comments

Since TTarget is always Confluent.Kafka.Consumer'2, you can always duck type (no chance of failure unless their API changes) and avoid doing it later. The only thing that changes is that now you'll need to change your call to the ConsumerCache so it's like: ConsumerCache.TryGet(instance.Instance!, out var groupId)

Originally posted by @zacharycmontoya in https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/pull/3055#discussion_r1389913770

lachmatt avatar Nov 20 '23 10:11 lachmatt