![]() |
VOOZH | about |
dotnet add package Confluent.Kafka.Extensions.Diagnostics --version 0.5.0
NuGet\Install-Package Confluent.Kafka.Extensions.Diagnostics -Version 0.5.0
<PackageReference Include="Confluent.Kafka.Extensions.Diagnostics" Version="0.5.0" />
<PackageVersion Include="Confluent.Kafka.Extensions.Diagnostics" Version="0.5.0" />Directory.Packages.props
<PackageReference Include="Confluent.Kafka.Extensions.Diagnostics" />Project file
paket add Confluent.Kafka.Extensions.Diagnostics --version 0.5.0
#r "nuget: Confluent.Kafka.Extensions.Diagnostics, 0.5.0"
#:package Confluent.Kafka.Extensions.Diagnostics@0.5.0
#addin nuget:?package=Confluent.Kafka.Extensions.Diagnostics&version=0.5.0Install as a Cake Addin
#tool nuget:?package=Confluent.Kafka.Extensions.Diagnostics&version=0.5.0Install as a Cake Tool
👁 GitHub Actions Badge
👁 NuGet Badge
The Confluent.Kafka.Extensions.Diagnostics package enables instrumentation of the Confluent.Kafka library
via Activity API.
Install-Package Confluent.Kafka.Extensions.Diagnostics
Producer instrumentation is done via wrapper class and, for this reason, the producer usage is not needed to be rewritten. However,
to enable producer instrumentation, BuildWithInstrumentation method should be called on the producer builder instead of Build.
After that, all produce calls (sync and async) will be instrumented.
using Confluent.Kafka;
using Confluent.Kafka.Extensions.Diagnostics;
using var producer =
new ProducerBuilder<Null, string>(new ProducerConfig(new ClientConfig { BootstrapServers = "localhost:9092" }))
.SetKeySerializer(Serializers.Null)
.SetValueSerializer(Serializers.Utf8)
.BuildWithInstrumentation();
await producer.ProduceAsync("topic", new Message<Null, string> { Value = "Hello World!" });
Unfortunately, consumer interface of Confluent.Kafka library is not very flexible. Therefore, the instrumentation is implemented
via an extension method on the consumer itself. For this reason, the consumer usage should be rewritten as follows:
using Confluent.Kafka;
using Confluent.Kafka.Extensions.Diagnostics;
using var consumer = new ConsumerBuilder<Ignore, string>(
new ConsumerConfig(new ClientConfig { BootstrapServers = "localhost:9092" })
{
GroupId = "group", AutoOffsetReset = AutoOffsetReset.Earliest
})
.SetValueDeserializer(Deserializers.Utf8)
.Build();
consumer.Subscribe("topic");
try
{
while (true)
{
try
{
consumer.ConsumeWithInstrumentation((result) =>
{
Console.WriteLine(result.Message.Value);
}, 2000);
}
catch (ConsumeException e)
{
Console.WriteLine($"Error occured: {e.Error.Reason}");
}
}
}
catch (OperationCanceledException)
{
consumer.Close();
}
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0 net6.0 is compatible. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
Showing the top 3 NuGet packages that depend on Confluent.Kafka.Extensions.Diagnostics:
| Package | Downloads |
|---|---|
|
Confluent.Kafka.Extensions.OpenTelemetry
OpenTelemetry instrumentation for Confluent.Kafka |
|
|
Yottadem.Kafka.Producer.Sdk
A lightweight and scalable Kafka Producer SDK for .NET applications developed by Yottadem Tech Solutions. |
|
|
ISC.Kafka.Extensions.Publisher
`ISC.Kafka.Extensions.Publisher` is a lightweight .NET package for publishing messages to Kafka. |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.5.1-alpha.4 | 7,406 | 11/5/2024 |
| 0.5.1-alpha.3 | 172 | 11/5/2024 |
| 0.5.1-alpha.2 | 996 | 8/18/2024 |
| 0.5.1-alpha.1 | 193 | 8/18/2024 |
| 0.5.0 | 2,198,469 | 8/7/2024 |
| 0.4.0 | 920,461 | 7/27/2023 |
| 0.3.1-alpha.5 | 243 | 7/27/2023 |
| 0.3.1-alpha.4 | 342 | 5/29/2023 |
| 0.3.1-alpha.3 | 241 | 5/29/2023 |
| 0.3.1-alpha.2 | 237 | 5/29/2023 |
| 0.3.1-alpha.1 | 274 | 5/29/2023 |
| 0.3.0 | 69,908 | 3/14/2023 |
| 0.2.3-alpha.5 | 279 | 3/14/2023 |
| 0.2.3-alpha.1 | 288 | 11/8/2022 |
| 0.2.2 | 162,271 | 8/8/2022 |
| 0.2.2-alpha.1 | 299 | 8/8/2022 |
| 0.2.1 | 606 | 8/8/2022 |
| 0.2.0 | 639 | 8/7/2022 |
| 0.1.0 | 860 | 8/5/2022 |