Skip to content

Commit

Permalink
Update public-api.asciidoc
Browse files Browse the repository at this point in the history
Document GetLabel
  • Loading branch information
gregkalapos committed Nov 25, 2020
1 parent b2ad7d2 commit d5a3d88
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions docs/public-api.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,19 @@ transaction.SetLabel("intSample", 42);
* `String key`: The tag key
* `String|Number|bool value`: The tag value
[float]
[[api-transaction-get-label]]
==== `Label GetLabel(string key)` added[1.8.0,Number and boolean labels require APM Server 6.7+]
Returns the label which was added in the <<api-transaction-set-label, SetLabel>> method. If the key does not exist, the method returns `null`.
[source,csharp]
----
var myLabel = transaction.GetLabel("foo");
Console.WriteLine(myLabel.Value);
----
[float]
[[api-transaction-tags]]
==== `Dictionary<string,string> Labels`
Expand Down Expand Up @@ -567,6 +580,20 @@ span.SetLabel("intSample", 42);
* `String key`: The tag key
* `String|Number|bool value`: The tag value
[float]
[[api-span-get-label]]
==== `Label GetLabel(string key)` added[1.8.0,Number and boolean labels require APM Server 6.7+]
Returns the label which was added in the <<api-span-set-label, SetLabel>> method. If the key does not exist, the method returns `null`.
[source,csharp]
----
var myLabel = span.GetLabel("foo");
Console.WriteLine(myLabel.Value);
----
[float]
[[api-span-tags]]
==== `Dictionary<string,string> Labels`
Expand Down

0 comments on commit d5a3d88

Please sign in to comment.