Skip to content

Commit 246d467

Browse files
committed
Update IActivity.Id docs
1 parent 9343930 commit 246d467

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

tracer/src/Datadog.Trace/Activity/DuckTypes/IActivity.cs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,13 @@ namespace Datadog.Trace.Activity.DuckTypes
1313
{
1414
internal interface IActivity : IDuckType
1515
{
16-
// The corresponding property on the Activity object is nullable,
17-
// but we are guaranteed that the value will not be null once the Activity is started.
18-
// Since we are only accessing the Activity after it has started, we can treat the value
19-
// as never having a null value.
16+
/// <summary>
17+
/// Gets an ID for the activity. If the Activity is using hierarchical IDs, the Id has a hierarchical structure:
18+
/// '|root-id.id1_id2.id3_' and is generated when Start() is called by appending suffix to Parent.Id
19+
/// or ParentId; Activity has no Id until it started, but as we only see started IDs, this will always be non null.
20+
/// </summary>
21+
/// <remarks>NOTE: this property allocates when using W3C activities, and so should generally not be called
22+
/// unless you know that you're not using W3C activities (because <see cref="IW3CActivity.SpanId"/> is null</remarks>
2023
string Id { get; }
2124

2225
string? ParentId { get; }

0 commit comments

Comments
 (0)