Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
robinmanuelthiel authored Nov 28, 2023
1 parent 22e8f1f commit 5a8abbc
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,18 +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());
fistActivity.AddTag("section", "first");
fistActivity.AddTag("date", DateTime.UtcNow.ToString()); // Add optional tags
Thread.Sleep(100); // Do work
fistActivity.Stop();
fistActivity.Stop(); // Stop activity
};

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

Expand Down

0 comments on commit 5a8abbc

Please sign in to comment.