@@ -160,6 +160,7 @@ public static class MetricNames
160
160
public const string OtherTransactionPrefix = "OtherTransaction" ;
161
161
public const string WebTransactionPrefix = "WebTransaction" ;
162
162
public const string SupportabilityPayloadsDroppedDueToMaxPayloadLimitPrefix = Supportability + PathSeparator + "DotNet/Collector" + PathSeparator + "MaxPayloadSizeLimit" ;
163
+ public const string KafkaMessageBrokerConsume = "Consume" ;
163
164
164
165
public static readonly char PathSeparatorChar = PathSeparator [ 0 ] ;
165
166
public static readonly char [ ] PathSeparatorCharArray = { PathSeparatorChar } ;
@@ -358,6 +359,7 @@ public enum MessageBrokerAction
358
359
public const string MessageBrokerNamed = "Named" ;
359
360
public const string MessageBrokerTemp = "Temp" ;
360
361
public const string Msmq = "MSMQ" ;
362
+ public const string Serialization = "Serialization" ;
361
363
362
364
public static MetricName GetMessageBroker ( MessageBrokerDestinationType type , MessageBrokerAction action ,
363
365
string vendor , string queueName )
@@ -368,6 +370,14 @@ public static MetricName GetMessageBroker(MessageBrokerDestinationType type, Mes
368
370
: MetricName . Create ( MessageBrokerPrefix , vendor , normalizedType , action , MessageBrokerTemp ) ;
369
371
}
370
372
373
+ public static MetricName GetMessageBrokerSerialization ( MessageBrokerDestinationType type , MessageBrokerAction action ,
374
+ string vendor , string queueName , string kind )
375
+ {
376
+ var normalizedType = NormalizeMessageBrokerDestinationTypeForMetricName ( type ) ;
377
+ return MetricName . Create ( MessageBrokerPrefix , vendor , normalizedType , action , MessageBrokerNamed , queueName , Serialization , kind ) ;
378
+
379
+ }
380
+
371
381
private static MessageBrokerDestinationType NormalizeMessageBrokerDestinationTypeForMetricName (
372
382
MessageBrokerDestinationType type )
373
383
{
@@ -384,6 +394,14 @@ private static MessageBrokerDestinationType NormalizeMessageBrokerDestinationTyp
384
394
return type ;
385
395
}
386
396
397
+ private const string KakfaTopic = "Topic" ;
398
+ private const string KakfaReceived = "Received" ;
399
+ private const string KakfaMessages = "Messages" ;
400
+ public static MetricName GetKafkaMessagesReceivedPerConsume ( string topic )
401
+ {
402
+ return MetricName . Create ( Message , "Kafka" , KakfaTopic , MessageBrokerNamed , topic , KakfaReceived , KakfaMessages ) ;
403
+ }
404
+
387
405
#endregion MessageBroker
388
406
389
407
#region Datastore
0 commit comments