< Summary

Class:Azure.Messaging.EventHubs.Diagnostics.EventHubsEventSource
Assembly:Azure.Messaging.EventHubs
File(s):C:\Git\azure-sdk-for-net\sdk\eventhub\Azure.Messaging.EventHubs\src\Diagnostics\EventHubsEventSource.cs
Covered lines:85
Uncovered lines:58
Coverable lines:143
Total lines:941
Line coverage:59.4% (85 of 143)
Covered branches:40
Total branches:368
Branch coverage:10.8% (40 of 368)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
get_Log()-100%100%
.ctor()-100%100%
.ctor(...)-100%100%
EventHubClientCreateStart(...)-66.67%16.67%
EventHubClientCreateComplete(...)-66.67%16.67%
EventPublishStart(...)-66.67%12.5%
EventPublishComplete(...)-66.67%12.5%
EventPublishError(...)-66.67%10%
EventReceiveStart(...)-66.67%10%
EventReceiveComplete(...)-66.67%10%
EventReceiveError(...)-66.67%8.33%
ClientCloseStart(...)-66.67%12.5%
ClientCloseComplete(...)-66.67%12.5%
ClientCloseError(...)-66.67%10%
GetPropertiesStart(...)-66.67%25%
GetPropertiesComplete(...)-66.67%25%
GetPropertiesError(...)-66.67%16.67%
GetPartitionPropertiesStart(...)-66.67%16.67%
GetPartitionPropertiesComplete(...)-66.67%16.67%
GetPartitionPropertiesError(...)-66.67%12.5%
PublishPartitionEventsToChannelStart(...)-66.67%16.67%
PublishPartitionEventsToChannelComplete(...)-66.67%16.67%
PublishPartitionEventsToChannelError(...)-66.67%12.5%
ReadEventsFromPartitionStart(...)-66.67%16.67%
ReadEventsFromPartitionComplete(...)-66.67%16.67%
ReadEventsFromPartitionError(...)-66.67%12.5%
ReadAllEventsStart(...)-66.67%25%
ReadAllEventsComplete(...)-66.67%25%
ReadAllEventsError(...)-0%0%
AmqpLinkAuthorizationRefreshStart(...)-66.67%16.67%
AmqpLinkAuthorizationRefreshComplete(...)-66.67%16.67%
AmqpLinkAuthorizationRefreshError(...)-0%0%
EventProcessorStart(...)-66.67%12.5%
EventProcessorStartComplete(...)-66.67%12.5%
EventProcessorStartError(...)-66.67%10%
EventProcessorStop(...)-66.67%12.5%
EventProcessorStopComplete(...)-66.67%12.5%
EventProcessorStopError(...)-66.67%10%
EventProcessorTaskError(...)-66.67%10%
EventProcessorPartitionProcessingStart(...)-66.67%10%
EventProcessorPartitionProcessingStartError(...)-0%0%
EventProcessorPartitionProcessingStartComplete(...)-66.67%8.33%
EventProcessorPartitionProcessingStop(...)-66.67%10%
EventProcessorPartitionProcessingStopError(...)-0%0%
EventProcessorPartitionProcessingStopComplete(...)-66.67%10%
EventProcessorPartitionProcessingError(...)-66.67%8.33%
EventProcessorLoadBalancingError(...)-0%0%
EventProcessorClaimOwnershipError(...)-0%0%
UnexpectedException(...)-66.67%50%

File(s)

C:\Git\azure-sdk-for-net\sdk\eventhub\Azure.Messaging.EventHubs\src\Diagnostics\EventHubsEventSource.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4using System;
 5using System.Diagnostics.Tracing;
 6using Azure.Core.Diagnostics;
 7using Azure.Messaging.EventHubs.Consumer;
 8using Azure.Messaging.EventHubs.Primitives;
 9using Azure.Messaging.EventHubs.Producer;
 10
 11namespace Azure.Messaging.EventHubs.Diagnostics
 12{
 13    /// <summary>
 14    ///   Serves as an ETW event source for logging of information about the
 15    ///   Event Hubs client types.
 16    /// </summary>
 17    ///
 18    /// <remarks>
 19    ///   When defining Start/Stop tasks, it is highly recommended that the
 20    ///   the StopEvent.Id must be exactly StartEvent.Id + 1.
 21    /// </remarks>
 22    ///
 23    [EventSource(Name = EventSourceName)]
 24    internal class EventHubsEventSource : EventSource
 25    {
 26        /// <summary>The name to use for the event source.</summary>
 27        private const string EventSourceName = "Azure-Messaging-EventHubs";
 28
 29        /// <summary>
 30        ///   Provides a singleton instance of the event source for callers to
 31        ///   use for logging.
 32        /// </summary>
 33        ///
 191234        public static EventHubsEventSource Log { get; } = new EventHubsEventSource(EventSourceName);
 35
 36        /// <summary>
 37        ///   Prevents an instance of the <see cref="EventHubsEventSource"/> class from being created
 38        ///   outside the scope of the <see cref="Log" /> instance.
 39        /// </summary>
 40        ///
 6841        protected EventHubsEventSource()
 42        {
 6843        }
 44
 45        /// <summary>
 46        ///   Prevents an instance of the <see cref="EventHubsEventSource"/> class from being created
 47        ///   outside the scope of the <see cref="Log" /> instance.
 48        /// </summary>
 49        ///
 50        /// <param name="eventSourceName">The name to assign to the event source.</param>
 51        ///
 252        private EventHubsEventSource(string eventSourceName) : base(eventSourceName, EventSourceSettings.Default, AzureE
 53        {
 254        }
 55
 56        /// <summary>
 57        ///   Indicates that an <see cref="EventHubConnection" /> is being created.
 58        /// </summary>
 59        ///
 60        /// <param name="eventHubsNamespace">The Event Hubs namespace associated with the client.</param>
 61        /// <param name="eventHubName">The name of the Event Hub associated with the client.</param>
 62        ///
 63        [Event(1, Level = EventLevel.Verbose, Message = "Creating EventHubClient (Namespace '{0}'; EventHub '{1}').")]
 64        public virtual void EventHubClientCreateStart(string eventHubsNamespace,
 65                                                      string eventHubName)
 66        {
 20667            if (IsEnabled())
 68            {
 069                WriteEvent(1, eventHubsNamespace ?? string.Empty, eventHubName ?? string.Empty);
 70            }
 20671        }
 72
 73        /// <summary>
 74        ///   Indicates that an <see cref="EventHubConnection" /> was created.
 75        /// </summary>
 76        ///
 77        /// <param name="eventHubsNamespace">The Event Hubs namespace associated with the client.</param>
 78        /// <param name="eventHubName">The name of the Event Hub associated with the client.</param>
 79        ///
 80        [Event(2, Level = EventLevel.Verbose, Message = "EventHubClient created (Namespace '{0}'; EventHub '{1}').")]
 81        public virtual void EventHubClientCreateComplete(string eventHubsNamespace,
 82                                                         string eventHubName)
 83        {
 20684            if (IsEnabled())
 85            {
 086                WriteEvent(2, eventHubsNamespace ?? string.Empty, eventHubName ?? string.Empty);
 87            }
 20688        }
 89
 90        /// <summary>
 91        ///   Indicates that the publishing of events has started.
 92        /// </summary>
 93        ///
 94        /// <param name="eventHubName">The name of the Event Hub being published to.</param>
 95        /// <param name="partitionIdOrKey">The identifier of a partition or the partition hash key used for publishing; 
 96        /// <param name="operationId">An artificial identifier for the publishing operation.</param>
 97        ///
 98        [Event(3, Level = EventLevel.Informational, Message = "Publishing events for Event Hub: {0} (Partition Id/Key: '
 99        public virtual void EventPublishStart(string eventHubName,
 100                                              string partitionIdOrKey,
 101                                              string operationId)
 102        {
 68103            if (IsEnabled())
 104            {
 0105                WriteEvent(3, eventHubName ?? string.Empty, partitionIdOrKey ?? string.Empty, operationId ?? string.Empt
 106            }
 68107        }
 108
 109        /// <summary>
 110        ///   Indicates that the publishing of events has completed.
 111        /// </summary>
 112        ///
 113        /// <param name="eventHubName">The name of the Event Hub being published to.</param>
 114        /// <param name="partitionIdOrKey">The identifier of a partition or the partition hash key used for publishing; 
 115        /// <param name="operationId">An artificial identifier for the publishing operation.</param>
 116        /// <param name="retryCount">The number of retries that were used for service communication.</param>
 117        ///
 118        [Event(4, Level = EventLevel.Informational, Message = "Completed publishing events for Event Hub: {0} (Partition
 119        public virtual void EventPublishComplete(string eventHubName,
 120                                                 string partitionIdOrKey,
 121                                                 string operationId,
 122                                                 int retryCount)
 123        {
 36124            if (IsEnabled())
 125            {
 0126                WriteEvent(4, eventHubName ?? string.Empty, partitionIdOrKey ?? string.Empty, operationId ?? string.Empt
 127            }
 36128        }
 129
 130        /// <summary>
 131        ///   Indicates that an exception was encountered while publishing events.
 132        /// </summary>
 133        ///
 134        /// <param name="eventHubName">The name of the Event Hub being published to.</param>
 135        /// <param name="partitionIdOrKey">The identifier of a partition or the partition hash key used for publishing; 
 136        /// <param name="operationId">An artificial identifier for the publishing operation.</param>
 137        /// <param name="errorMessage">The message for the exception that occurred.</param>
 138        ///
 139        [Event(5, Level = EventLevel.Error, Message = "An exception occurred while publishing events for Event Hub: {0} 
 140        public virtual void EventPublishError(string eventHubName,
 141                                              string partitionIdOrKey,
 142                                              string operationId,
 143                                              string errorMessage)
 144        {
 68145            if (IsEnabled())
 146            {
 0147                WriteEvent(5, eventHubName ?? string.Empty, partitionIdOrKey ?? string.Empty, operationId ?? string.Empt
 148            }
 68149        }
 150
 151        /// <summary>
 152        ///   Indicates that the receiving of events has started.
 153        /// </summary>
 154        ///
 155        /// <param name="eventHubName">The name of the Event Hub being received from.</param>
 156        /// <param name="consumerGroup">The consumer group associated with the receive operation.</param>
 157        /// <param name="partitionId">The identifier of the partition events are being received from.</param>
 158        /// <param name="operationId">An artificial identifier for the publishing operation.</param>
 159        ///
 160        [Event(6, Level = EventLevel.Informational, Message = "Receiving events for Event Hub: {0} (Consumer Group: '{1}
 161        public virtual void EventReceiveStart(string eventHubName,
 162                                              string consumerGroup,
 163                                              string partitionId,
 164                                              string operationId)
 165        {
 34166            if (IsEnabled())
 167            {
 0168                WriteEvent(6, eventHubName ?? string.Empty, consumerGroup ?? string.Empty, partitionId ?? string.Empty, 
 169            }
 34170        }
 171
 172        /// <summary>
 173        ///   Indicates that the receiving of events has completed.
 174        /// </summary>
 175        ///
 176        /// <param name="eventHubName">The name of the Event Hub being received from.</param>
 177        /// <param name="partitionId">The identifier of the partition events are being received from.</param>
 178        /// <param name="consumerGroup">The consumer group associated with the receive operation.</param>
 179        /// <param name="operationId">An artificial identifier for the publishing operation.</param>
 180        /// <param name="retryCount">The number of retries that were used for service communication.</param>
 181        /// <param name="eventCount">The number of events that were received in the batch.</param>
 182        ///
 183        [Event(7, Level = EventLevel.Informational, Message = "Completed receiving events for Event Hub: {0} (Consumer G
 184        public virtual void EventReceiveComplete(string eventHubName,
 185                                                 string consumerGroup,
 186                                                 string partitionId,
 187                                                 string operationId,
 188                                                 int retryCount,
 189                                                 int eventCount)
 190        {
 18191            if (IsEnabled())
 192            {
 0193                WriteEvent(7, eventHubName ?? string.Empty, consumerGroup ?? string.Empty, partitionId ?? string.Empty, 
 194            }
 18195        }
 196
 197        /// <summary>
 198        ///   Indicates that an exception was encountered while receiving events.
 199        /// </summary>
 200        ///
 201        /// <param name="eventHubName">The name of the Event Hub being received from.</param>
 202        /// <param name="partitionId">The identifier of the partition events are being received from.</param>
 203        /// <param name="consumerGroup">The consumer group associated with the receive operation.</param>
 204        /// <param name="operationId">An artificial identifier for the publishing operation.</param>
 205        /// <param name="errorMessage">The message for the exception that occurred.</param>
 206        ///
 207        [Event(8, Level = EventLevel.Error, Message = "An exception occurred while receiving events for Event Hub: {0} (
 208        public virtual void EventReceiveError(string eventHubName,
 209                                              string consumerGroup,
 210                                              string partitionId,
 211                                              string operationId,
 212                                              string errorMessage)
 213        {
 34214            if (IsEnabled())
 215            {
 0216                WriteEvent(8, eventHubName ?? string.Empty, consumerGroup ?? string.Empty, partitionId ?? string.Empty, 
 217            }
 34218        }
 219
 220        /// <summary>
 221        ///   Indicates that a client is closing, which may correspond to an <see cref="EventHubConnection" />,
 222        ///   <see cref="EventHubProducerClient" />, <see cref="EventHubConsumerClient" />, or <c>EventProcessorClient</
 223        /// </summary>
 224        ///
 225        /// <param name="clientTypeName">The name of the type of client being closed.</param>
 226        /// <param name="eventHubName">The name of the Event Hub associated with the client.</param>
 227        /// <param name="clientId">An identifier to associate with the client.</param>
 228        ///
 229        [Event(9, Level = EventLevel.Verbose, Message = "Closing an {0} (EventHub '{1}'; Identifier '{2}').")]
 230        public virtual void ClientCloseStart(string clientTypeName,
 231                                             string eventHubName,
 232                                             string clientId)
 233        {
 126234            if (IsEnabled())
 235            {
 0236                WriteEvent(9, clientTypeName ?? string.Empty, eventHubName ?? string.Empty, clientId ?? string.Empty);
 237            }
 126238        }
 239
 240        /// <summary>
 241        ///   Indicates that a client has been closed, which may correspond to an <see cref="EventHubConnection" />,
 242        ///   <see cref="EventHubProducerClient" />, <see cref="EventHubConsumerClient" />, or <c>EventProcessorClient</
 243        /// </summary>
 244        ///
 245        /// <param name="clientTypeName">The name of the type of client being closed.</param>
 246        /// <param name="eventHubName">The name of the Event Hub associated with the client.</param>
 247        /// <param name="clientId">An identifier to associate with the client.</param>
 248        ///
 249        [Event(10, Level = EventLevel.Verbose, Message = "An {0} has been closed (EventHub '{1}'; Identifier '{2}').")]
 250        public virtual void ClientCloseComplete(string clientTypeName,
 251                                                string eventHubName,
 252                                                string clientId)
 253        {
 126254            if (IsEnabled())
 255            {
 0256                WriteEvent(10, clientTypeName ?? string.Empty, eventHubName ?? string.Empty, clientId ?? string.Empty);
 257            }
 126258        }
 259
 260        /// <summary>
 261        ///   Indicates that an exception was encountered while closing an <see cref="EventHubConnection" />,
 262        ///   <see cref="EventHubProducerClient" />, <see cref="EventHubConsumerClient" />, or <c>EventProcessorClient</
 263        /// </summary>
 264        ///
 265        /// <param name="clientTypeName">The name of the type of client being closed.</param>
 266        /// <param name="eventHubName">The name of the Event Hub associated with the client.</param>
 267        /// <param name="clientId">An identifier to associate with the client.</param>
 268        /// <param name="errorMessage">The message for the exception that occurred.</param>
 269        ///
 270        [Event(11, Level = EventLevel.Error, Message = "An exception occurred while closing an {0} (EventHub '{1}'; Iden
 271        public virtual void ClientCloseError(string clientTypeName,
 272                                             string eventHubName,
 273                                             string clientId,
 274                                             string errorMessage)
 275        {
 14276            if (IsEnabled())
 277            {
 0278                WriteEvent(11, clientTypeName ?? string.Empty, eventHubName ?? string.Empty, clientId ?? string.Empty, e
 279            }
 14280        }
 281
 282        /// <summary>
 283        ///   Indicates that retrieval of the Event Hub properties has started.
 284        /// </summary>
 285        ///
 286        /// <param name="eventHubName">The name of the Event Hub that properties are being retrieved for.</param>
 287        ///
 288        [Event(12, Level = EventLevel.Informational, Message = "Retrieving properties for Event Hub: {0}.")]
 289        public virtual void GetPropertiesStart(string eventHubName)
 290        {
 36291            if (IsEnabled())
 292            {
 0293                WriteEvent(12, eventHubName ?? string.Empty);
 294            }
 36295        }
 296
 297        /// <summary>
 298        ///   Indicates that retrieval of the Event Hub properties has completed.
 299        /// </summary>
 300        ///
 301        /// <param name="eventHubName">The name of the Event Hub that properties are being retrieved for.</param>
 302        ///
 303        [Event(13, Level = EventLevel.Informational, Message = "Completed retrieving properties for Event Hub: {0}.")]
 304        public virtual void GetPropertiesComplete(string eventHubName)
 305        {
 20306            if (IsEnabled())
 307            {
 0308                WriteEvent(13, eventHubName ?? string.Empty);
 309            }
 20310        }
 311
 312        /// <summary>
 313        ///   Indicates that an exception was encountered while retrieving Event Hub properties.
 314        /// </summary>
 315        ///
 316        /// <param name="eventHubName">The name of the Event Hub that properties are being retrieved for.</param>
 317        /// <param name="errorMessage">The message for the exception that occurred.</param>
 318        ///
 319        [Event(14, Level = EventLevel.Error, Message = "An exception occurred while retrieving properties for Event Hub:
 320        public virtual void GetPropertiesError(string eventHubName,
 321                                               string errorMessage)
 322        {
 38323            if (IsEnabled())
 324            {
 0325                WriteEvent(14, eventHubName ?? string.Empty, errorMessage ?? string.Empty);
 326            }
 38327        }
 328
 329        /// <summary>
 330        ///   Indicates that retrieval of the Event Hub partition properties has started.
 331        /// </summary>
 332        ///
 333        /// <param name="eventHubName">The name of the Event Hub that properties are being retrieved for.</param>
 334        /// <param name="partitionId">The identifier of the partition that properties are being retrieved for.</param>
 335        ///
 336        [Event(15, Level = EventLevel.Informational, Message = "Retrieving properties for Event Hub: {0} (Partition Id: 
 337        public virtual void GetPartitionPropertiesStart(string eventHubName,
 338                                                        string partitionId)
 339        {
 36340            if (IsEnabled())
 341            {
 0342                WriteEvent(15, eventHubName ?? string.Empty, partitionId ?? string.Empty);
 343            }
 36344        }
 345
 346        /// <summary>
 347        ///   Indicates that retrieval of the Event Hub partition properties has completed.
 348        /// </summary>
 349        ///
 350        /// <param name="eventHubName">The name of the Event Hub that properties are being retrieved for.</param>
 351        /// <param name="partitionId">The identifier of the partition that properties are being retrieved for.</param>
 352        ///
 353        [Event(16, Level = EventLevel.Informational, Message = "Completed retrieving properties for Event Hub: {0} (Part
 354        public virtual void GetPartitionPropertiesComplete(string eventHubName,
 355                                                           string partitionId)
 356        {
 20357            if (IsEnabled())
 358            {
 0359                WriteEvent(16, eventHubName ?? string.Empty, partitionId ?? string.Empty);
 360            }
 20361        }
 362
 363        /// <summary>
 364        ///   Indicates that an exception was encountered while retrieving Event Hub partition properties.
 365        /// </summary>
 366        ///
 367        /// <param name="eventHubName">The name of the Event Hub that properties are being retrieved for.</param>
 368        /// <param name="partitionId">The identifier of the partition that properties are being retrieved for.</param>
 369        /// <param name="errorMessage">The message for the exception that occurred.</param>
 370        ///
 371        [Event(17, Level = EventLevel.Error, Message = "An exception occurred while retrieving properties for Event Hub:
 372        public virtual void GetPartitionPropertiesError(string eventHubName,
 373                                                        string partitionId,
 374                                                        string errorMessage)
 375        {
 38376            if (IsEnabled())
 377            {
 0378                WriteEvent(17, eventHubName ?? string.Empty, partitionId ?? string.Empty, errorMessage ?? string.Empty);
 379            }
 38380        }
 381
 382        /// <summary>
 383        ///   Indicates that reading events from an Event Hub partition has started.
 384        /// </summary>
 385        ///
 386        /// <param name="eventHubName">The name of the Event Hub that events are being read from.</param>
 387        /// <param name="partitionId">The identifier of the partition that properties are being read from.</param>
 388        ///
 389        [Event(18, Level = EventLevel.Informational, Message = "Beginning to publish events to a background channel for 
 390        public virtual void PublishPartitionEventsToChannelStart(string eventHubName,
 391                                                                 string partitionId)
 392        {
 104393            if (IsEnabled())
 394            {
 0395                WriteEvent(18, eventHubName ?? string.Empty, partitionId ?? string.Empty);
 396            }
 104397        }
 398
 399        /// <summary>
 400        ///   Indicates that reading events from an Event Hub partition has completed.
 401        /// </summary>
 402        ///
 403        /// <param name="eventHubName">The name of the Event Hub that events are being read from.</param>
 404        /// <param name="partitionId">The identifier of the partition that properties are being read from.</param>
 405        ///
 406        [Event(19, Level = EventLevel.Informational, Message = "Completed publishing events to a background channel for 
 407        public virtual void PublishPartitionEventsToChannelComplete(string eventHubName,
 408                                                                    string partitionId)
 409        {
 104410            if (IsEnabled())
 411            {
 0412                WriteEvent(19, eventHubName ?? string.Empty, partitionId ?? string.Empty);
 413            }
 104414        }
 415
 416        /// <summary>
 417        ///   Indicates that an exception was encountered while reading events from an Event Hub partition.
 418        /// </summary>
 419        ///
 420        /// <param name="eventHubName">The name of the Event Hub that events are being read from.</param>
 421        /// <param name="partitionId">The identifier of the partition that properties are being read from.</param>
 422        /// <param name="errorMessage">The message for the exception that occurred.</param>
 423        ///
 424        [Event(20, Level = EventLevel.Error, Message = "An exception occurred while publishing events to a background ch
 425        public virtual void PublishPartitionEventsToChannelError(string eventHubName,
 426                                                                 string partitionId,
 427                                                                 string errorMessage)
 428        {
 34429            if (IsEnabled())
 430            {
 0431                WriteEvent(20, eventHubName ?? string.Empty, partitionId ?? string.Empty, errorMessage ?? string.Empty);
 432            }
 34433        }
 434        /// <summary>
 435        ///   Indicates that reading events from an Event Hub partition has started.
 436        /// </summary>
 437        ///
 438        /// <param name="eventHubName">The name of the Event Hub that events are being read from.</param>
 439        /// <param name="partitionId">The identifier of the partition that properties are being read from.</param>
 440        ///
 441        [Event(21, Level = EventLevel.Informational, Message = "Beginning to read events for Event Hub: {0} (Partition I
 442        public virtual void ReadEventsFromPartitionStart(string eventHubName,
 443                                                         string partitionId)
 444        {
 38445            if (IsEnabled())
 446            {
 0447                WriteEvent(21, eventHubName ?? string.Empty, partitionId ?? string.Empty);
 448            }
 38449        }
 450
 451        /// <summary>
 452        ///   Indicates that reading events from an Event Hub partition has completed.
 453        /// </summary>
 454        ///
 455        /// <param name="eventHubName">The name of the Event Hub that events are being read from.</param>
 456        /// <param name="partitionId">The identifier of the partition that properties are being read from.</param>
 457        ///
 458        [Event(22, Level = EventLevel.Informational, Message = "Completed reading events for Event Hub: {0} (Partition I
 459        public virtual void ReadEventsFromPartitionComplete(string eventHubName,
 460                                                            string partitionId)
 461        {
 38462            if (IsEnabled())
 463            {
 0464                WriteEvent(22, eventHubName ?? string.Empty, partitionId ?? string.Empty);
 465            }
 38466        }
 467
 468        /// <summary>
 469        ///   Indicates that an exception was encountered while reading events from an Event Hub partition.
 470        /// </summary>
 471        ///
 472        /// <param name="eventHubName">The name of the Event Hub that events are being read from.</param>
 473        /// <param name="partitionId">The identifier of the partition that properties are being read from.</param>
 474        /// <param name="errorMessage">The message for the exception that occurred.</param>
 475        ///
 476        [Event(23, Level = EventLevel.Error, Message = "An exception occurred while reading events for Event Hub: {0} (P
 477        public virtual void ReadEventsFromPartitionError(string eventHubName,
 478                                                         string partitionId,
 479                                                         string errorMessage)
 480        {
 8481            if (IsEnabled())
 482            {
 0483                WriteEvent(23, eventHubName ?? string.Empty, partitionId ?? string.Empty, errorMessage ?? string.Empty);
 484            }
 8485        }
 486
 487        /// <summary>
 488        ///   Indicates that reading events from all partitions of the Event Hub has started.
 489        /// </summary>
 490        ///
 491        /// <param name="eventHubName">The name of the Event Hub that events are being read from.</param>
 492        ///
 493        [Event(24, Level = EventLevel.Informational, Message = "Beginning to read events for all partitions of Event Hub
 494        public virtual void ReadAllEventsStart(string eventHubName)
 495        {
 52496            if (IsEnabled())
 497            {
 0498                WriteEvent(24, eventHubName ?? string.Empty);
 499            }
 52500        }
 501
 502        /// <summary>
 503        ///   Indicates that reading events from all partitions of the Event Hub has completed.
 504        /// </summary>
 505        ///
 506        /// <param name="eventHubName">The name of the Event Hub that events are being read from.</param>
 507        ///
 508        [Event(25, Level = EventLevel.Informational, Message = "Completed reading events for all partitions of Event Hub
 509        public virtual void ReadAllEventsComplete(string eventHubName)
 510        {
 28511            if (IsEnabled())
 512            {
 0513                WriteEvent(25, eventHubName ?? string.Empty);
 514            }
 28515        }
 516
 517        /// <summary>
 518        ///   Indicates that an exception was encountered while reading events from all partitions of the Event Hub.
 519        /// </summary>
 520        ///
 521        /// <param name="eventHubName">The name of the Event Hub that events are being read from.</param>
 522        /// <param name="errorMessage">The message for the exception that occurred.</param>
 523        ///
 524        [Event(26, Level = EventLevel.Error, Message = "An exception occurred while reading events for all partitions of
 525        public virtual void ReadAllEventsError(string eventHubName,
 526                                               string errorMessage)
 527        {
 0528            if (IsEnabled())
 529            {
 0530                WriteEvent(26, eventHubName ?? string.Empty, errorMessage ?? string.Empty);
 531            }
 0532        }
 533
 534        /// <summary>
 535        ///   Indicates that refreshing authorization for an AMQP link has started.
 536        /// </summary>
 537        ///
 538        /// <param name="eventHubName">The name of the Event Hub that the link is associated with.</param>
 539        /// <param name="endpoint">The service endpoint that the link is bound to for communication.</param>
 540        ///
 541        [Event(27, Level = EventLevel.Informational, Message = "Beginning refresh of AMQP link authorization for Event H
 542        public virtual void AmqpLinkAuthorizationRefreshStart(string eventHubName,
 543                                                              string endpoint)
 544        {
 4545            if (IsEnabled())
 546            {
 0547                WriteEvent(27, eventHubName ?? string.Empty, endpoint ?? string.Empty);
 548            }
 4549        }
 550
 551        /// <summary>
 552        ///   Indicates that refreshing authorization for an AMQP link has completed.
 553        /// </summary>
 554        ///
 555        /// <param name="eventHubName">The name of the Event Hub that the link is associated with.</param>
 556        /// <param name="endpoint">The service endpoint that the link is bound to for communication.</param>
 557        ///
 558        [Event(28, Level = EventLevel.Informational, Message = "Completed refresh of AMQP link authorization for Event H
 559        public virtual void AmqpLinkAuthorizationRefreshComplete(string eventHubName,
 560                                                                 string endpoint)
 561        {
 4562            if (IsEnabled())
 563            {
 0564                WriteEvent(28, eventHubName ?? string.Empty, endpoint ?? string.Empty);
 565            }
 4566        }
 567
 568        /// <summary>
 569        ///   Indicates that an exception was encountered while refreshing authorization for an AMQP link has started.
 570        /// </summary>
 571        ///
 572        /// <param name="eventHubName">The name of the Event Hub that the link is associated with.</param>
 573        /// <param name="endpoint">The service endpoint that the link is bound to for communication.</param>
 574        /// <param name="errorMessage">The message for the exception that occurred.</param>
 575        ///
 576        [Event(29, Level = EventLevel.Error, Message = "An exception occurred while refreshing AMQP link authorization f
 577        public virtual void AmqpLinkAuthorizationRefreshError(string eventHubName,
 578                                                              string endpoint,
 579                                                              string errorMessage)
 580        {
 0581            if (IsEnabled())
 582            {
 0583                WriteEvent(29, eventHubName ?? string.Empty, endpoint ?? string.Empty, errorMessage ?? string.Empty);
 584            }
 0585        }
 586
 587        /// <summary>
 588        ///   Indicates that an <see cref="EventProcessor{TPartition}" /> instance is about to begin processing events.
 589        /// </summary>
 590        ///
 591        /// <param name="identifier">A unique name used to identify the event processor.</param>
 592        /// <param name="eventHubName">The name of the Event Hub that the processor is associated with.</param>
 593        /// <param name="consumerGroup">The name of the consumer group that the processor is associated with.</param>
 594        ///
 595        [Event(30, Level = EventLevel.Informational, Message = "Starting a new event processor instance with identifier 
 596        public virtual void EventProcessorStart(string identifier,
 597                                                string eventHubName,
 598                                                string consumerGroup)
 599        {
 78600            if (IsEnabled())
 601            {
 0602                WriteEvent(30, identifier ?? string.Empty, eventHubName ?? string.Empty, consumerGroup ?? string.Empty);
 603            }
 78604        }
 605
 606        /// <summary>
 607        ///   Indicates that an <see cref="EventProcessor{TPartition}" /> instance is about to begin processing events.
 608        /// </summary>
 609        ///
 610        /// <param name="identifier">A unique name used to identify the event processor.</param>
 611        /// <param name="eventHubName">The name of the Event Hub that the processor is associated with.</param>
 612        /// <param name="consumerGroup">The name of the consumer group that the processor is associated with.</param>
 613        ///
 614        [Event(31, Level = EventLevel.Informational, Message = "The new event processor instance with identifier '{0}' f
 615        public virtual void EventProcessorStartComplete(string identifier,
 616                                                        string eventHubName,
 617                                                        string consumerGroup)
 618        {
 82619            if (IsEnabled())
 620            {
 0621                WriteEvent(31, identifier ?? string.Empty, eventHubName ?? string.Empty, consumerGroup ?? string.Empty);
 622            }
 82623        }
 624
 625        /// <summary>
 626        ///   Indicates that an <see cref="EventProcessor{TPartition}" /> instance has encountered an exception while st
 627        /// </summary>
 628        ///
 629        /// <param name="identifier">A unique name used to identify the event processor.</param>
 630        /// <param name="eventHubName">The name of the Event Hub that the processor is associated with.</param>
 631        /// <param name="consumerGroup">The name of the consumer group that the processor is associated with.</param>
 632        /// <param name="errorMessage">The message for the exception that occurred.</param>
 633        ///
 634        [Event(32, Level = EventLevel.Error, Message = "An exception occurred while starting a new event processor insta
 635        public virtual void EventProcessorStartError(string identifier,
 636                                                     string eventHubName,
 637                                                     string consumerGroup,
 638                                                     string errorMessage)
 639        {
 4640            if (IsEnabled())
 641            {
 0642                WriteEvent(32, identifier ?? string.Empty, eventHubName ?? string.Empty, consumerGroup ?? string.Empty, 
 643            }
 4644        }
 645
 646        /// <summary>
 647        ///   Indicates that an <see cref="EventProcessor{TPartition}" /> instance is beginning to stop processing event
 648        /// </summary>
 649        ///
 650        /// <param name="identifier">A unique name used to identify the event processor.</param>
 651        /// <param name="eventHubName">The name of the Event Hub that the processor is associated with.</param>
 652        /// <param name="consumerGroup">The name of the consumer group that the processor is associated with.</param>
 653        ///
 654        [Event(33, Level = EventLevel.Informational, Message = "The event processor instance with identifier '{0}' for E
 655        public virtual void EventProcessorStop(string identifier,
 656                                               string eventHubName,
 657                                               string consumerGroup)
 658        {
 82659            if (IsEnabled())
 660            {
 0661                WriteEvent(33, identifier ?? string.Empty, eventHubName ?? string.Empty, consumerGroup ?? string.Empty);
 662            }
 82663        }
 664
 665        /// <summary>
 666        ///   Indicates that an <see cref="EventProcessor{TPartition}" /> instance has been stopped and is no longer pro
 667        /// </summary>
 668        ///
 669        /// <param name="identifier">A unique name used to identify the event processor.</param>
 670        /// <param name="eventHubName">The name of the Event Hub that the processor is associated with.</param>
 671        /// <param name="consumerGroup">The name of the consumer group that the processor is associated with.</param>
 672        ///
 673        [Event(34, Level = EventLevel.Informational, Message = "The event processor instance with identifier '{0}' for E
 674        public virtual void EventProcessorStopComplete(string identifier,
 675                                                       string eventHubName,
 676                                                       string consumerGroup)
 677        {
 82678            if (IsEnabled())
 679            {
 0680                WriteEvent(34, identifier ?? string.Empty, eventHubName ?? string.Empty, consumerGroup ?? string.Empty);
 681            }
 82682        }
 683
 684        /// <summary>
 685        ///   Indicates that an <see cref="EventProcessor{TPartition}" /> instance has encountered an exception while st
 686        /// </summary>
 687        ///
 688        /// <param name="identifier">A unique name used to identify the event processor.</param>
 689        /// <param name="eventHubName">The name of the Event Hub that the processor is associated with.</param>
 690        /// <param name="consumerGroup">The name of the consumer group that the processor is associated with.</param>
 691        /// <param name="errorMessage">The message for the exception that occurred.</param>
 692        ///
 693        [Event(35, Level = EventLevel.Error, Message = "An exception occurred while stopping the event processor instanc
 694        public virtual void EventProcessorStopError(string identifier,
 695                                                    string eventHubName,
 696                                                    string consumerGroup,
 697                                                    string errorMessage)
 698        {
 4699            if (IsEnabled())
 700            {
 0701                WriteEvent(35, identifier ?? string.Empty, eventHubName ?? string.Empty, consumerGroup ?? string.Empty, 
 702            }
 4703        }
 704
 705        /// <summary>
 706        ///   Indicates that an <see cref="EventProcessor{TPartition}" /> instance has encountered an error during proce
 707        /// </summary>
 708        ///
 709        /// <param name="identifier">A unique name used to identify the event processor.</param>
 710        /// <param name="eventHubName">The name of the Event Hub that the processor is associated with.</param>
 711        /// <param name="consumerGroup">The name of the consumer group that the processor is associated with.</param>
 712        /// <param name="errorMessage">The message for the exception that occurred.</param>
 713        ///
 714        [Event(36, Level = EventLevel.Error, Message = "An exception occurred during partition processing or load balanc
 715        public virtual void EventProcessorTaskError(string identifier,
 716                                                    string eventHubName,
 717                                                    string consumerGroup,
 718                                                    string errorMessage)
 719        {
 14720            if (IsEnabled())
 721            {
 0722                WriteEvent(36, identifier ?? string.Empty, eventHubName ?? string.Empty, consumerGroup ?? string.Empty, 
 723            }
 14724        }
 725
 726        /// <summary>
 727        ///   Indicates that an <see cref="EventProcessor{TPartition}" /> instance has taken ownership of a partition an
 728        /// </summary>
 729        ///
 730        /// <param name="partitionId">The identifier of the Event Hub partition whose processing is starting.</param>
 731        /// <param name="identifier">A unique name used to identify the event processor.</param>
 732        /// <param name="eventHubName">The name of the Event Hub that the processor is associated with.</param>
 733        /// <param name="consumerGroup">The name of the consumer group that the processor is associated with.</param>
 734        ///
 735        [Event(37, Level = EventLevel.Verbose, Message = "Starting to process partition '{0}' using processor instance w
 736        public virtual void EventProcessorPartitionProcessingStart(string partitionId,
 737                                                                   string identifier,
 738                                                                   string eventHubName,
 739                                                                   string consumerGroup)
 740        {
 8741            if (IsEnabled())
 742            {
 0743                WriteEvent(37, partitionId ?? string.Empty, identifier ?? string.Empty, eventHubName ?? string.Empty, co
 744            }
 8745        }
 746
 747        /// <summary>
 748        ///   Indicates that an <see cref="EventProcessor{TPartition}" /> instance has experienced an exception while st
 749        /// </summary>
 750        ///
 751        /// <param name="partitionId">The identifier of the Event Hub partition whose processing is starting.</param>
 752        /// <param name="identifier">A unique name used to identify the event processor.</param>
 753        /// <param name="eventHubName">The name of the Event Hub that the processor is associated with.</param>
 754        /// <param name="consumerGroup">The name of the consumer group that the processor is associated with.</param>
 755        /// <param name="errorMessage">The message for the exception that occurred.</param>
 756        ///
 757        [Event(38, Level = EventLevel.Error, Message = "An exception occurred while starting to process partition '{0}' 
 758        public virtual void EventProcessorPartitionProcessingStartError(string partitionId,
 759                                                                        string identifier,
 760                                                                        string eventHubName,
 761                                                                        string consumerGroup,
 762                                                                        string errorMessage)
 763        {
 0764            if (IsEnabled())
 765            {
 0766                WriteEvent(38, partitionId ?? string.Empty, identifier ?? string.Empty, eventHubName ?? string.Empty, co
 767            }
 0768        }
 769
 770        /// <summary>
 771        ///   Indicates that an <see cref="EventProcessor{TPartition}" /> instance has taken ownership of a partition an
 772        /// </summary>
 773        ///
 774        /// <param name="partitionId">The identifier of the Event Hub partition whose processing is starting.</param>
 775        /// <param name="identifier">A unique name used to identify the event processor.</param>
 776        /// <param name="eventHubName">The name of the Event Hub that the processor is associated with.</param>
 777        /// <param name="consumerGroup">The name of the consumer group that the processor is associated with.</param>
 778        /// <param name="eventPosition">The description of the <see cref="EventPosition" /> used as the starting point f
 779        ///
 780        [Event(39, Level = EventLevel.Verbose, Message = "Completed starting to process partition '{0}' using processor 
 781        public virtual void EventProcessorPartitionProcessingStartComplete(string partitionId,
 782                                                                           string identifier,
 783                                                                           string eventHubName,
 784                                                                           string consumerGroup,
 785                                                                           string eventPosition)
 786        {
 8787            if (IsEnabled())
 788            {
 0789                WriteEvent(39, partitionId ?? string.Empty, identifier ?? string.Empty, eventHubName ?? string.Empty, co
 790            }
 8791        }
 792
 793        /// <summary>
 794        ///   Indicates that an <see cref="EventProcessor{TPartition}" /> instance has lost ownership of a partition and
 795        /// </summary>
 796        ///
 797        /// <param name="partitionId">The identifier of the Event Hub partition whose processing is stopping.</param>
 798        /// <param name="identifier">A unique name used to identify the event processor.</param>
 799        /// <param name="eventHubName">The name of the Event Hub that the processor is associated with.</param>
 800        /// <param name="consumerGroup">The name of the consumer group that the processor is associated with.</param>
 801        ///
 802        [Event(40, Level = EventLevel.Verbose, Message = "Stopping processing for partition '{0}' by processor instance 
 803        public virtual void EventProcessorPartitionProcessingStop(string partitionId,
 804                                                                  string identifier,
 805                                                                  string eventHubName,
 806                                                                  string consumerGroup)
 807        {
 10808            if (IsEnabled())
 809            {
 0810                WriteEvent(40, partitionId ?? string.Empty, identifier ?? string.Empty, eventHubName ?? string.Empty, co
 811            }
 10812        }
 813
 814        /// <summary>
 815        ///   Indicates that an <see cref="EventProcessor{TPartition}" /> instance has experienced an exception while st
 816        /// </summary>
 817        ///
 818        /// <param name="partitionId">The identifier of the Event Hub partition whose processing is stopping.</param>
 819        /// <param name="identifier">A unique name used to identify the event processor.</param>
 820        /// <param name="eventHubName">The name of the Event Hub that the processor is associated with.</param>
 821        /// <param name="consumerGroup">The name of the consumer group that the processor is associated with.</param>
 822        /// <param name="errorMessage">The message for the exception that occurred.</param>
 823        ///
 824        [Event(41, Level = EventLevel.Error, Message = "An exception occurred while stopping processing for partition '{
 825        public virtual void EventProcessorPartitionProcessingStopError(string partitionId,
 826                                                                       string identifier,
 827                                                                       string eventHubName,
 828                                                                       string consumerGroup,
 829                                                                       string errorMessage)
 830        {
 0831            if (IsEnabled())
 832            {
 0833                WriteEvent(41, partitionId ?? string.Empty, identifier ?? string.Empty, eventHubName ?? string.Empty, co
 834            }
 0835        }
 836
 837        /// <summary>
 838        ///   Indicates that an <see cref="EventProcessor{TPartition}" /> instance has finished stopping processing for 
 839        /// </summary>
 840        ///
 841        /// <param name="partitionId">The identifier of the Event Hub partition whose processing is stopping.</param>
 842        /// <param name="identifier">A unique name used to identify the event processor.</param>
 843        /// <param name="eventHubName">The name of the Event Hub that the processor is associated with.</param>
 844        /// <param name="consumerGroup">The name of the consumer group that the processor is associated with.</param>
 845        ///
 846        [Event(42, Level = EventLevel.Verbose, Message = "Completed stopping processing for partition '{0}' by processor
 847        public virtual void EventProcessorPartitionProcessingStopComplete(string partitionId,
 848                                                                          string identifier,
 849                                                                          string eventHubName,
 850                                                                          string consumerGroup)
 851        {
 10852            if (IsEnabled())
 853            {
 0854                WriteEvent(42, partitionId ?? string.Empty, identifier ?? string.Empty, eventHubName ?? string.Empty, co
 855            }
 10856        }
 857
 858        /// <summary>
 859        ///   Indicates that an <see cref="EventProcessor{TPartition}" /> instance has experienced an exception while pr
 860        /// </summary>
 861        ///
 862        /// <param name="partitionId">The identifier of the Event Hub partition whose processing is taking place.</param
 863        /// <param name="identifier">A unique name used to identify the event processor.</param>
 864        /// <param name="eventHubName">The name of the Event Hub that the processor is associated with.</param>
 865        /// <param name="consumerGroup">The name of the consumer group that the processor is associated with.</param>
 866        /// <param name="errorMessage">The message for the exception that occurred.</param>
 867        ///
 868        [Event(43, Level = EventLevel.Error, Message = "An exception occurred while processing events for partition '{0}
 869        public virtual void EventProcessorPartitionProcessingError(string partitionId,
 870                                                                   string identifier,
 871                                                                   string eventHubName,
 872                                                                   string consumerGroup,
 873                                                                   string errorMessage)
 874        {
 34875            if (IsEnabled())
 876            {
 0877                WriteEvent(43, partitionId ?? string.Empty, identifier ?? string.Empty, eventHubName ?? string.Empty, co
 878            }
 34879        }
 880
 881        /// <summary>
 882        ///   Indicates that an <see cref="EventProcessor{TPartition}" /> instance has experienced an exception while pe
 883        /// </summary>
 884        ///
 885        /// <param name="identifier">A unique name used to identify the event processor.</param>
 886        /// <param name="eventHubName">The name of the Event Hub that the processor is associated with.</param>
 887        /// <param name="consumerGroup">The name of the consumer group that the processor is associated with.</param>
 888        /// <param name="errorMessage">The message for the exception that occurred.</param>
 889        ///
 890        [Event(44, Level = EventLevel.Error, Message = "An exception occurred while performing load balancing for the pr
 891        public virtual void EventProcessorLoadBalancingError(string identifier,
 892                                                             string eventHubName,
 893                                                             string consumerGroup,
 894                                                             string errorMessage)
 895        {
 0896            if (IsEnabled())
 897            {
 0898                WriteEvent(44, identifier ?? string.Empty, eventHubName ?? string.Empty, consumerGroup ?? string.Empty, 
 899            }
 0900        }
 901
 902        /// <summary>
 903        ///   Indicates that an <see cref="EventProcessor{TPartition}" /> instance has experienced an exception while at
 904        /// </summary>
 905        ///
 906        /// <param name="identifier">A unique name used to identify the event processor.</param>
 907        /// <param name="eventHubName">The name of the Event Hub that the processor is associated with.</param>
 908        /// <param name="consumerGroup">The name of the consumer group that the processor is associated with.</param>
 909        /// <param name="partitionId">The identifier of the partition for which the attempt to claim ownership failed.</
 910        /// <param name="errorMessage">The message for the exception that occurred.</param>
 911        ///
 912        [Event(45, Level = EventLevel.Error, Message = "An exception occurred while attempting to claim partition owners
 913        public virtual void EventProcessorClaimOwnershipError(string identifier,
 914                                                              string eventHubName,
 915                                                              string consumerGroup,
 916                                                              string partitionId,
 917                                                              string errorMessage)
 918        {
 0919            if (IsEnabled())
 920            {
 0921                WriteEvent(45, identifier ?? string.Empty, eventHubName ?? string.Empty, consumerGroup ?? string.Empty, 
 922            }
 0923        }
 924
 925        /// <summary>
 926        ///   Indicates that an exception was encountered in an unexpected code path, not directly associated with
 927        ///   an Event Hubs operation.
 928        /// </summary>
 929        ///
 930        /// <param name="errorMessage">The message for the exception that occurred.</param>
 931        ///
 932        [Event(100, Level = EventLevel.Error, Message = "An unexpected exception was encountered. Error Message: '{0}'")
 933        public void UnexpectedException(string errorMessage)
 934        {
 2935            if (IsEnabled())
 936            {
 0937                WriteEvent(100, errorMessage);
 938            }
 2939        }
 940    }
 941}

Methods/Properties

get_Log()
.ctor()
.ctor(...)
EventHubClientCreateStart(...)
EventHubClientCreateComplete(...)
EventPublishStart(...)
EventPublishComplete(...)
EventPublishError(...)
EventReceiveStart(...)
EventReceiveComplete(...)
EventReceiveError(...)
ClientCloseStart(...)
ClientCloseComplete(...)
ClientCloseError(...)
GetPropertiesStart(...)
GetPropertiesComplete(...)
GetPropertiesError(...)
GetPartitionPropertiesStart(...)
GetPartitionPropertiesComplete(...)
GetPartitionPropertiesError(...)
PublishPartitionEventsToChannelStart(...)
PublishPartitionEventsToChannelComplete(...)
PublishPartitionEventsToChannelError(...)
ReadEventsFromPartitionStart(...)
ReadEventsFromPartitionComplete(...)
ReadEventsFromPartitionError(...)
ReadAllEventsStart(...)
ReadAllEventsComplete(...)
ReadAllEventsError(...)
AmqpLinkAuthorizationRefreshStart(...)
AmqpLinkAuthorizationRefreshComplete(...)
AmqpLinkAuthorizationRefreshError(...)
EventProcessorStart(...)
EventProcessorStartComplete(...)
EventProcessorStartError(...)
EventProcessorStop(...)
EventProcessorStopComplete(...)
EventProcessorStopError(...)
EventProcessorTaskError(...)
EventProcessorPartitionProcessingStart(...)
EventProcessorPartitionProcessingStartError(...)
EventProcessorPartitionProcessingStartComplete(...)
EventProcessorPartitionProcessingStop(...)
EventProcessorPartitionProcessingStopError(...)
EventProcessorPartitionProcessingStopComplete(...)
EventProcessorPartitionProcessingError(...)
EventProcessorLoadBalancingError(...)
EventProcessorClaimOwnershipError(...)
UnexpectedException(...)