Activity.AddTag Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
AddTag(String, Object) |
Updates the activity to have a tag with an additional |
AddTag(String, String) |
Updates the Activity to have a new tag with the provided |
AddTag(String, Object)
- Source:
- Activity.cs
- Source:
- Activity.cs
- Source:
- Activity.cs
Updates the activity to have a tag with an additional key
and value
.
public:
System::Diagnostics::Activity ^ AddTag(System::String ^ key, System::Object ^ value);
public System.Diagnostics.Activity AddTag (string key, object? value);
member this.AddTag : string * obj -> System.Diagnostics.Activity
Public Function AddTag (key As String, value As Object) As Activity
Parameters
- key
- String
The tag key name.
- value
- Object
The tag value mapped to the input key.
Returns
this
for convenient chaining.
Remarks
This shows up in the TagObjects enumeration. It is meant for information that is useful to log but not needed for runtime control (for the latter, Baggage).
Applies to
AddTag(String, String)
- Source:
- Activity.cs
- Source:
- Activity.cs
- Source:
- Activity.cs
Updates the Activity to have a new tag with the provided key
and value
.
public:
System::Diagnostics::Activity ^ AddTag(System::String ^ key, System::String ^ value);
public System.Diagnostics.Activity AddTag (string key, string? value);
public System.Diagnostics.Activity AddTag (string key, string value);
member this.AddTag : string * string -> System.Diagnostics.Activity
Public Function AddTag (key As String, value As String) As Activity
Parameters
- key
- String
The tag key.
- value
- String
The tag value.
Returns
this
for convenient chaining.
Remarks
This key/value pair is included in the collection returned by the Tags or TagObjects property.
Tags TagObjects are meant for information that is useful to log with the Activity. For information that's needed for runtime control, use the Baggage property.