Skip to content

Commit 52f8a32

Browse files
committed
Move ConsumeAndProcessMessageHandler to Confluent.Kafka namespace
1 parent 4539da7 commit 52f8a32

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

src/OpenTelemetry.Instrumentation.ConfluentKafka/ConsumeAndProcessMessageHandler.cs renamed to src/OpenTelemetry.Instrumentation.ConfluentKafka/OpenTelemetryConsumeAndProcessMessageHandler.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22
// SPDX-License-Identifier: Apache-2.0
33

44
using System.Diagnostics;
5-
using Confluent.Kafka;
65

7-
namespace OpenTelemetry.Instrumentation.ConfluentKafka;
6+
namespace Confluent.Kafka;
87

98
/// <summary>
109
/// An asynchronous action to process the <see cref="ConsumeResult{TKey,TValue}"/>.
@@ -15,7 +14,7 @@ namespace OpenTelemetry.Instrumentation.ConfluentKafka;
1514
/// <typeparam name="TKey">The type of key of the <see cref="ConsumeResult{TKey,TValue}"/>.</typeparam>
1615
/// <typeparam name="TValue">The type of value of the <see cref="ConsumeResult{TKey,TValue}"/>.</typeparam>
1716
/// <returns>A <see cref="ValueTask"/>.</returns>
18-
public delegate ValueTask ConsumeAndProcessMessageHandler<TKey, TValue>(
17+
public delegate ValueTask OpenTelemetryConsumeAndProcessMessageHandler<TKey, TValue>(
1918
ConsumeResult<TKey, TValue> consumeResult,
2019
Activity? activity,
2120
CancellationToken cancellationToken = default);

src/OpenTelemetry.Instrumentation.ConfluentKafka/OpenTelemetryConsumeResultExtensions.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,30 +49,30 @@ public static bool TryExtractPropagationContext<TKey, TValue>(
4949
}
5050

5151
/// <summary>
52-
/// Consumes a message and creates <see href="https://github.com/open-telemetry/semantic-conventions/blob/main/docs/messaging/messaging-spans.md#span-kind">a process span</see> embracing the <see cref="ConsumeAndProcessMessageHandler{TKey,TValue}"/>.
52+
/// Consumes a message and creates <see href="https://github.com/open-telemetry/semantic-conventions/blob/main/docs/messaging/messaging-spans.md#span-kind">a process span</see> embracing the <see cref="OpenTelemetryConsumeAndProcessMessageHandler{TKey,TValue}"/>.
5353
/// </summary>
5454
/// <param name="consumer">The <see cref="IConsumer{TKey,TValue}"/>.</param>
55-
/// <param name="handler">A <see cref="ConsumeAndProcessMessageHandler{TKey,TValue}"/>.</param>
55+
/// <param name="handler">A <see cref="OpenTelemetryConsumeAndProcessMessageHandler{TKey,TValue}"/>.</param>
5656
/// <typeparam name="TKey">The type of key of the <see cref="ConsumeResult{TKey,TValue}"/>.</typeparam>
5757
/// <typeparam name="TValue">The type of value of the <see cref="ConsumeResult{TKey,TValue}"/>.</typeparam>
5858
/// <returns>A <see cref="ValueTask"/>.</returns>
5959
public static ValueTask<ConsumeResult<TKey, TValue>?> ConsumeAndProcessMessageAsync<TKey, TValue>(
6060
this IConsumer<TKey, TValue> consumer,
61-
ConsumeAndProcessMessageHandler<TKey, TValue> handler) =>
61+
OpenTelemetryConsumeAndProcessMessageHandler<TKey, TValue> handler) =>
6262
ConsumeAndProcessMessageAsync(consumer, handler, default);
6363

6464
/// <summary>
65-
/// Consumes a message and creates <see href="https://github.com/open-telemetry/semantic-conventions/blob/main/docs/messaging/messaging-spans.md#span-kind">a process span</see> embracing the <see cref="ConsumeAndProcessMessageHandler{TKey,TValue}"/>.
65+
/// Consumes a message and creates <see href="https://github.com/open-telemetry/semantic-conventions/blob/main/docs/messaging/messaging-spans.md#span-kind">a process span</see> embracing the <see cref="OpenTelemetryConsumeAndProcessMessageHandler{TKey,TValue}"/>.
6666
/// </summary>
6767
/// <param name="consumer">The <see cref="IConsumer{TKey,TValue}"/>.</param>
68-
/// <param name="handler">A <see cref="ConsumeAndProcessMessageHandler{TKey,TValue}"/>.</param>
68+
/// <param name="handler">A <see cref="OpenTelemetryConsumeAndProcessMessageHandler{TKey,TValue}"/>.</param>
6969
/// <param name="cancellationToken">An optional <see cref="CancellationToken"/>.</param>
7070
/// <typeparam name="TKey">The type of key of the <see cref="ConsumeResult{TKey,TValue}"/>.</typeparam>
7171
/// <typeparam name="TValue">The type of value of the <see cref="ConsumeResult{TKey,TValue}"/>.</typeparam>
7272
/// <returns>A <see cref="ValueTask"/>.</returns>
7373
public static async ValueTask<ConsumeResult<TKey, TValue>?> ConsumeAndProcessMessageAsync<TKey, TValue>(
7474
this IConsumer<TKey, TValue> consumer,
75-
ConsumeAndProcessMessageHandler<TKey, TValue> handler,
75+
OpenTelemetryConsumeAndProcessMessageHandler<TKey, TValue> handler,
7676
CancellationToken cancellationToken)
7777
{
7878
#if NETFRAMEWORK

0 commit comments

Comments
 (0)