Skip to content

Commit

Permalink
Update docs/public-api.asciidoc (elastic#332)
Browse files Browse the repository at this point in the history
* Update docs/public-api.asciidoc

Adding note about potential null in Elastic.Apm.Agent.Tracer.CurrentTransaction

* Update docs/public-api.asciidoc
  • Loading branch information
gregkalapos authored Jul 3, 2019
1 parent 90e552a commit 76d9647
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/public-api.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Returns the currently active transaction.
See the <<api-transaction>> to customize the current transaction.

If there is no current transaction,
this method will return null.
this method will return `null`.

[source,csharp]
----
Expand Down Expand Up @@ -259,6 +259,7 @@ var asyncResult = await transaction.CaptureSpan("Select FROM customer", ApiConst
NOTE: The <<convenient-capture-span>> method does not start any `Task` for you, so you have to call it with the `await` keyword if you use one of the overloads that accept `Task` or `Task<T>`.
NOTE: Code samples above use `Elastic.Apm.Agent.Tracer.CurrentTransaction`. In production code you should make sure the `CurrentTransaction` is not `null`.
//----------------------------
[float]
Expand Down

0 comments on commit 76d9647

Please sign in to comment.