public static MetricName GetMessageBroker(MessageBrokerDestinationType type, MessageBrokerAction action, string vendor, string queueName) { var normalizedType = NormalizeMessageBrokerDestinationTypeForMetricName(type); return((queueName != null) ? MetricName.Create(MessageBrokerPrefix, vendor, normalizedType, action, MessageBrokerNamed, queueName) : MetricName.Create(MessageBrokerPrefix, vendor, normalizedType, action, MessageBrokerTemp)); }
public static ISegment StartMessageBrokerSegmentOrThrow(this IAgent agent, string vendor, MessageBrokerDestinationType destinationType, string destination, MessageBrokerAction action, MethodCall methodCall = null) { methodCall = methodCall ?? GetDefaultMethodCall(agent); var segment = agent.CurrentTransaction.StartMessageBrokerSegment(methodCall, destinationType, action, vendor, destination); if (segment == null) { throw new NullReferenceException("segment"); } return(segment); }
public ISegment StartMessageBrokerSegment(MethodCall methodCall, MessageBrokerDestinationType destinationType, MessageBrokerAction operation, string brokerVendorName, string destinationName) { #if DEBUG Log.Finest("Skipping StartMessageBrokerSegment outside of a transaction"); #endif return(Segment.NoOpSegment); }