Skip to content

Commit 5804b1c

Browse files
committed
Add some constants used for parent/child process communication
1 parent 1a2426b commit 5804b1c

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

src/Cli/Microsoft.DotNet.Cli.Utils/Activities.cs

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,27 @@
66
namespace Microsoft.DotNet.Cli.Utils;
77

88
/// <summary>
9-
/// Contains helpers for working with <see cref="System.Diagnostics.Activity">Activities</see> in the .NET CLI.
9+
/// Contains helpers for working with <see cref="Activity">Activities</see> in the .NET CLI.
1010
/// </summary>
1111
public static class Activities
1212
{
13-
1413
/// <summary>
1514
/// The main entrypoint for creating <see cref="Activity">Activities</see> in the .NET CLI.
1615
/// All activities created in the CLI should use this <see cref="ActivitySource"/>, to allow
1716
/// consumers to easily filter and trace CLI activities.
1817
/// </summary>
1918
public static ActivitySource Source { get; } = new("dotnet-cli", Product.Version);
19+
20+
/// <summary>
21+
/// The environment variable used to transfer the chain of parent activity IDs.
22+
/// This should be used when constructing new sub-processes in order to
23+
/// track spans across calls.
24+
/// </summary>
25+
public const string TRACEPARENT = nameof(TRACEPARENT);
26+
/// <summary>
27+
/// The environment variable used to transfer the trace state of the parent activities.
28+
/// This should be used when constructing new sub-processes in order to
29+
/// track spans across calls.
30+
/// </summary>
31+
public const string TRACESTATE = nameof(TRACESTATE);
2032
}

0 commit comments

Comments
 (0)