| | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 2 | | // Licensed under the MIT License. |
| | 3 | |
|
| | 4 | | namespace Azure.Messaging.ServiceBus.Diagnostics |
| | 5 | | { |
| | 6 | | /// <summary> |
| | 7 | | /// The set of well-known properties associated with Service Bus diagnostics. |
| | 8 | | /// </summary> |
| | 9 | | /// |
| | 10 | | internal static class DiagnosticProperty |
| | 11 | | { |
| | 12 | | /// <summary>The common root for activity names in the Service Bus context.</summary> |
| | 13 | | public const string BaseActivityName = "Azure.Messaging.ServiceBus"; |
| | 14 | |
|
| | 15 | | /// <summary>The attribute which represents a unique identifier for the diagnostics context.</summary> |
| | 16 | | public const string DiagnosticIdAttribute = "Diagnostic-Id"; |
| | 17 | |
|
| | 18 | | /// <summary>The attribute which represents the message Id.</summary> |
| | 19 | | public const string MessageIdAttribute = "MessageId"; |
| | 20 | |
|
| | 21 | | /// <summary>The attribute which represents the session Id. Only populated for sessions.</summary> |
| | 22 | | public const string SessionIdAttribute = "SessionId"; |
| | 23 | |
|
| | 24 | | /// <summary>The attribute which represents the sequence number.</summary> |
| | 25 | | public const string SequenceNumbersAttribute = "SequenceNumber"; |
| | 26 | |
|
| | 27 | | /// <summary>The attribute which represents the requested message count for peek/receive operations.</summary> |
| | 28 | | public const string RequestedMessageCountAttribute = "RequestedMessageCount"; |
| | 29 | |
|
| | 30 | | /// <summary>The attribute which represents the lock tokens.</summary> |
| | 31 | | public const string LockTokensAttribute = "LockTokens"; |
| | 32 | |
|
| | 33 | | /// <summary>The attribute which represents the message lock expiration time.</summary> |
| | 34 | | public const string LockedUntilAttribute = "LockedUntilUtc"; |
| | 35 | |
|
| | 36 | | /// <summary>The attribute which represents the type of diagnostics information.</summary> |
| | 37 | | public const string TypeAttribute = "kind"; |
| | 38 | |
|
| | 39 | | /// <summary>The attribute which represents the Azure service to associate with diagnostics information.</summar |
| | 40 | | public const string ServiceContextAttribute = "component"; |
| | 41 | |
|
| | 42 | | /// <summary>The attribute which represents the Service Bus entity instance to associate with diagnostics inform |
| | 43 | | public const string EntityAttribute = "message_bus.destination"; |
| | 44 | |
|
| | 45 | | /// <summary>The attribute which represents the fully-qualified endpoint address of the Service Bus namespace to |
| | 46 | | public const string EndpointAttribute = "peer.address"; |
| | 47 | |
|
| | 48 | | /// <summary>The value which identifies the Service Bus diagnostics context.</summary> |
| | 49 | | public const string ServiceBusServiceContext = "servicebus"; |
| | 50 | |
|
| | 51 | | /// <summary>The attribute which represents the kind of diagnostic scope.</summary> |
| | 52 | | public const string KindAttribute = "kind"; |
| | 53 | |
|
| | 54 | | /// <summary>The value which identifies the Event Processor scope kind.</summary> |
| | 55 | | public const string ServerKind = "server"; |
| | 56 | |
|
| | 57 | | /// <summary>The value which identifies the message client scope kind.</summary> |
| | 58 | | public const string ClientKind = "client"; |
| | 59 | |
|
| | 60 | | /// <summary>The value which identifies an Service Bus entity producer as the type associated with the diagnosti |
| | 61 | | public const string SenderKind = "sender"; |
| | 62 | |
|
| | 63 | | /// <summary> |
| | 64 | | /// The activity name associated with events. |
| | 65 | | /// </summary> |
| | 66 | | /// |
| 20 | 67 | | public static string MessageActivityName { get; } = "Message"; |
| | 68 | |
|
| | 69 | | /// <summary> |
| | 70 | | /// The activity name associated with the send operation. |
| | 71 | | /// </summary> |
| | 72 | | /// |
| 12 | 73 | | public static string SendActivityName { get; } = "ServiceBusSender.Send"; |
| | 74 | |
|
| | 75 | | /// <summary> |
| | 76 | | /// The activity name associated with the schedule operation. |
| | 77 | | /// </summary> |
| | 78 | | /// |
| 6 | 79 | | public static string ScheduleActivityName { get; } = "ServiceBusSender.Schedule"; |
| | 80 | |
|
| | 81 | | /// <summary> |
| | 82 | | /// The activity name associated with the cancel |
| | 83 | | /// scheduled message operation. |
| | 84 | | /// </summary> |
| | 85 | | /// |
| 6 | 86 | | public static string CancelActivityName { get; } = "ServiceBusSender.Cancel"; |
| | 87 | |
|
| | 88 | | /// <summary> |
| | 89 | | /// The activity name associated with the receive |
| | 90 | | /// operation. |
| | 91 | | /// </summary> |
| | 92 | | /// |
| 12 | 93 | | public static string ReceiveActivityName { get; } = "ServiceBusReceiver.Receive"; |
| | 94 | |
|
| | 95 | | /// <summary> |
| | 96 | | /// The activity name associated with the receive |
| | 97 | | /// operation. |
| | 98 | | /// </summary> |
| | 99 | | /// |
| 0 | 100 | | public static string ReceiveDeferredActivityName { get; } = "ServiceBusReceiver.ReceiveDeferred"; |
| | 101 | |
|
| | 102 | | /// <summary> |
| | 103 | | /// The activity name associated with the peek |
| | 104 | | /// operation. |
| | 105 | | /// </summary> |
| | 106 | | /// |
| 12 | 107 | | public static string PeekActivityName { get; } = "ServiceBusReceiver.Peek"; |
| | 108 | |
|
| | 109 | | /// <summary> |
| | 110 | | /// The activity name associated with the abandon |
| | 111 | | /// operation. |
| | 112 | | /// </summary> |
| | 113 | | /// |
| 6 | 114 | | public static string AbandonActivityName { get; } = "ServiceBusReceiver.Abandon"; |
| | 115 | |
|
| | 116 | | /// <summary> |
| | 117 | | /// The activity name associated with the complete |
| | 118 | | /// operation. |
| | 119 | | /// </summary> |
| | 120 | | /// |
| 6 | 121 | | public static string CompleteActivityName { get; } = "ServiceBusReceiver.Complete"; |
| | 122 | |
|
| | 123 | | /// <summary> |
| | 124 | | /// The activity name associated with the dead letter |
| | 125 | | /// operation. |
| | 126 | | /// </summary> |
| | 127 | | /// |
| 6 | 128 | | public static string DeadLetterActivityName { get; } = "ServiceBusReceiver.DeadLetter"; |
| | 129 | |
|
| | 130 | | /// <summary> |
| | 131 | | /// The activity name associated with the defer |
| | 132 | | /// operation. |
| | 133 | | /// </summary> |
| | 134 | | /// |
| 6 | 135 | | public static string DeferActivityName { get; } = "ServiceBusReceiver.Defer"; |
| | 136 | |
|
| | 137 | | /// <summary> |
| | 138 | | /// The activity name associated with the renew message lock |
| | 139 | | /// operation. |
| | 140 | | /// </summary> |
| | 141 | | /// |
| 6 | 142 | | public static string RenewMessageLockActivityName { get; } = "ServiceBusReceiver.RenewMessageLock"; |
| | 143 | |
|
| | 144 | | /// <summary> |
| | 145 | | /// The activity name associated with the renew session lock |
| | 146 | | /// operation. |
| | 147 | | /// </summary> |
| | 148 | | /// |
| 6 | 149 | | public static string RenewSessionLockActivityName { get; } = "ServiceBusSessionReceiver.RenewSessionLock"; |
| | 150 | |
|
| | 151 | | /// <summary> |
| | 152 | | /// The activity name associated with the get session state |
| | 153 | | /// operation. |
| | 154 | | /// </summary> |
| | 155 | | /// |
| 6 | 156 | | public static string GetSessionStateActivityName { get; } = "ServiceBusSessionReceiver.GetSessionState"; |
| | 157 | |
|
| | 158 | | /// <summary> |
| | 159 | | /// The activity name associated with the set session state |
| | 160 | | /// operation. |
| | 161 | | /// </summary> |
| | 162 | | /// |
| 6 | 163 | | public static string SetSessionStateActivityName { get; } = "ServiceBusSessionReceiver.SetSessionState"; |
| | 164 | |
|
| | 165 | | /// <summary> |
| | 166 | | /// The activity name associated with the get session state |
| | 167 | | /// operation. |
| | 168 | | /// </summary> |
| | 169 | | /// |
| 6 | 170 | | public static string ProcessMessageActivityName { get; } = "ServiceBusProcessor.ProcessMessage"; |
| | 171 | |
|
| | 172 | | /// <summary> |
| | 173 | | /// The activity name associated with the set session state |
| | 174 | | /// operation. |
| | 175 | | /// </summary> |
| | 176 | | /// |
| 0 | 177 | | public static string ProcessSessionMessageActivityName { get; } = "ServiceBusSessionProcessor.ProcessSessionMess |
| | 178 | | } |
| | 179 | | } |