You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: xml/System.Diagnostics/Activity.xml
+63-23Lines changed: 63 additions & 23 deletions
Original file line number
Diff line number
Diff line change
@@ -17,8 +17,22 @@
17
17
</Base>
18
18
<Interfaces />
19
19
<Docs>
20
-
<summary>To be added.</summary>
21
-
<remarks>To be added.</remarks>
20
+
<summary>Represents an operation with context to be used for logging.</summary>
21
+
<remarks>
22
+
<formattype="text/markdown"><![CDATA[
23
+
24
+
An `Activity` has an operation name, an ID, a start time and duration, tags, and baggage.
25
+
26
+
The current activity can be accessed with the static <xref:System.Diagnostics.Activity.Current?displayProperty=nameWithType> property.
27
+
28
+
Activities should be created by calling the constructor, configured as necessary, and then started with the <xref:System.Diagnostics.Activity.Start%2A> method, which maintains parent-child relationships for the activities and sets <xref:System.Diagnostics.Activity.Current?displayProperty=nameWithType>.
29
+
30
+
When an activity is finished, it should be stopped with the <xref:System.Diagnostics.Activity.Stop?displayProperty=nameWithType> method.
31
+
32
+
No `Activity` methods allow exceptions to escape as a response to bad inputs. They are thrown and caught (which allows debuggers and monitors to see the error), but the exception is suppressed, and the operation does something reasonable (typically it does nothing).
33
+
34
+
]]></format>
35
+
</remarks>
22
36
</Docs>
23
37
<Members>
24
38
<MemberMemberName=".ctor">
@@ -69,8 +83,8 @@ Note that <xref:System.Diagnostics.Activity> has a "builder" pattern: you call t
<summary>Gets or sets the default ID format for the <seecref="T:System.Diagnostics.Activity" />.</summary>
232
246
<value>To be added.</value>
233
-
<remarks>To be added.</remarks>
247
+
<remarks>
248
+
<formattype="text/markdown"><![CDATA[
249
+
250
+
The `Activity` instance tries to use the same format for IDs as its parent. If the activity has no parent, this property determines the default format to use.
251
+
252
+
]]></format>
253
+
</remarks>
234
254
</Docs>
235
255
</Member>
236
256
<MemberMemberName="Duration">
@@ -273,9 +293,15 @@ This key/value pair is included in the collection returned by the <see cref="P:S
273
293
<ReturnType>System.Boolean</ReturnType>
274
294
</ReturnValue>
275
295
<Docs>
276
-
<summary>To be added.</summary>
277
-
<value>To be added.</value>
278
-
<remarks>To be added.</remarks>
296
+
<summary>Gets or sets a valud that detrmines if the <seecref="P:System.Diagnostics.Activity.DefaultIdFormat" /> is always used to define the default ID format. </summary>
297
+
<value><seelangword="true" /> to always use the <seecref="P:System.Diagnostics.Activity.DefaultIdFormat" />; otherwise, <seelangword= "false" />.</value>
298
+
<remarks>
299
+
<formattype="text/markdown"><![CDATA[
300
+
301
+
Normally if the <xref:System.Diagnostics.Activity.ParentId> is defined, its format determines the format used by the current <xref:System.Diagnostics.Activity>. However, if `ForceDefaultFormat` is set to `true`, the ID format is always defined by the <xref:System.Diagnostics.Activity.DefaultIdFormat> property even if the <xref:System.Diagnostics.Activity.ParentID> is defined and the parent has a different format.
302
+
303
+
]]></format>
304
+
</remarks>
279
305
</Docs>
280
306
</Member>
281
307
<MemberMemberName="GetBaggageItem">
@@ -354,8 +380,8 @@ An ID has a hierarchical structure: `root-id.id1_id2.id3_`. The ID is generated
If the <xref:System.Diagnostics.Activity.ParentId?displayProperty=nameWithType> is in the W3C format, this property returns the <xref:System.Diagnostics.Activity.SpanId> part of the ParentId. Otherwise it returns a zero <xref:System.Diagnostics.Activity.SpanId>.
500
+
501
+
]]></format>
502
+
</remarks>
471
503
</Docs>
472
504
</Member>
473
505
<MemberMemberName="Recorded">
@@ -486,8 +518,8 @@ This property value can be `null` if this is a root <see cref="T:System.Diagnost
486
518
<ReturnType>System.Boolean</ReturnType>
487
519
</ReturnValue>
488
520
<Docs>
489
-
<summary>To be added.</summary>
490
-
<value>To be added.</value>
521
+
<summary>Gets a value that indicates whether the W3CIdFlags.Recorded flag is set.</summary>
522
+
<value><seelangword="true" /> if the W3CIdFlags.Recorded flag is set; otherwise, <seelangword="false" />.</value>
491
523
<remarks>To be added.</remarks>
492
524
</Docs>
493
525
</Member>
@@ -661,8 +693,8 @@ This property should only be used in 'boundary' scenarios where an <see cref="T:
<summary>Gets the SPAN part of the <seecref="P:System.Diagnostics.Activity.Id" />.</summary>
697
+
<value>The ID for the SPAN part of <seecref="P:System.Diagnostics.Activity.Id" />, if the <seecref="T:System.Diagnostics.Activity" /> has the W3C format; otherwise, a zero <seelangword="SpanId" />.</value>
<summary>Gets the TraceId part of the <seecref="P:System.Diagnostics.Activity.Id" />.</summary>
852
+
<value>The ID for the TraceId part of the <seecref="P:System.Diagnostics.Activity.Id" />, if the ID has the W3C format; otherwise, a zero TraceId.</value>
The `tracestate` header is intended to carry supplemental information to trace identity contained in the trace parent. `tracestate` consists of a list of key/value pairs that convey information about the request position in multiple distributed tracing graphs. This information is typically used by distributed tracing systems and should not be used for general purpose baggage, since this may break the correlation of a distributed trace.
878
+
879
+
Logically `TraceStateString` is just a kind of baggage (if flows just like baggage), but because it is expected to be special-cased (it has its own HTTP header), it is more convenient/efficient if it is not lumped in with other baggage.
Copy file name to clipboardExpand all lines: xml/System.Diagnostics/ActivitySpanId.xml
+43-21Lines changed: 43 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -18,8 +18,16 @@
18
18
</Interface>
19
19
</Interfaces>
20
20
<Docs>
21
-
<summary>To be added.</summary>
22
-
<remarks>To be added.</remarks>
21
+
<summary>Represents a <seecref="P:System.Diagnostics.Activity.SpanId" /> formatted based on a W3C standard.</summary>
22
+
<remarks>
23
+
<formattype="text/markdown"><![CDATA[
24
+
25
+
The `ActivitySpanId` structure reflects the format that the W3C standard requires for the ID of a single span in a trace. It consists of 8 bytes, typically displayed as 16 hexadecimal characters. An `ActivitySpanId` is returned by the <xref:System.Diagnostics.Activity.SpanId?displayProperty=nameWithtype> for an <xref:System.Diagnostics.Activity> whose <xref:System.Diagnostics.Activity.IdFormat?displayProperty=nameWithType> is <xref:System.Diagnostics.ActivityIdFormat.W3C?displayProperty=nameWithtype>.
26
+
27
+
Because an `ActivitySpanId` is a structure that contains 8 bytes, it can be passed by reference. `ActivitySpanId` contains methods for converting to and from hexadecimal string representation, tries to avoid changing formats until it has to, and caches its string representation after it is created. It is mostly useful as an exchange type.
0 commit comments