From f0a827c20b327db9b7c77f8b4097304d112d11fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20K=C3=BCsters?= Date: Mon, 4 Dec 2023 12:20:47 +0100 Subject: [PATCH] Update README.md --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3283c3e..dbbb1dd 100644 --- a/README.md +++ b/README.md @@ -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 }; ```