Skip to content

Commit

Permalink
Merge pull request #52 from wemogy/SebastianKuesters-patch-1
Browse files Browse the repository at this point in the history
Update README.md
  • Loading branch information
SebastianKuesters authored Dec 4, 2023
2 parents 9be18af + f0a827c commit 0bb0d24
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,16 +130,16 @@ Use Activities in your Code to create sections of code that can be traced.
```csharp
using (var fistActivity = Observability.DefaultActivities.StartActivity("First section"))
{
fistActivity.AddTag("date", DateTime.UtcNow.ToString()); // Add optional tags
fistActivity?.AddTag("date", DateTime.UtcNow.ToString()); // Add optional tags
Thread.Sleep(100); // Do work
fistActivity.Stop(); // Stop activity
fistActivity?.Stop(); // Stop activity
};

using (var secondActivity = Observability.DefaultActivities.StartActivity("Second section"))
{
secondActivity.AddTag("foo", "far"); // Add optional tags
secondActivity?.AddTag("foo", "far"); // Add optional tags
Thread.Sleep(200); // Do work
secondActivity.Stop(); // Stop activity
secondActivity?.Stop(); // Stop activity
};
```

Expand Down

0 comments on commit 0bb0d24

Please sign in to comment.