diff --git a/content/en/docs/languages/net/shim.md b/content/en/docs/languages/net/shim.md index 80f00fd7db44..94271c13ceb9 100644 --- a/content/en/docs/languages/net/shim.md +++ b/content/en/docs/languages/net/shim.md @@ -371,8 +371,8 @@ using var span = tracer.StartActiveSpan("another-span", links: links); A [status](/docs/concepts/signals/traces/#span-status) can be set on a span, typically used to specify that a span has not completed successfully - -`Status.Error`. In rare scenarios, you could override the `Error` status with -`Ok`, but don't set `Ok` on successfully-completed spans. +`StatusCode.Error`. In rare scenarios, you could override the `Error` status +with `Ok`, but don't set `Ok` on successfully-completed spans. The status can be set at any time before the span is finished: @@ -385,7 +385,7 @@ try } catch (Exception ex) { - span.SetStatus(Status.Error, "Something bad happened!"); + span.SetStatus(new(StatusCode.Error, "Something bad happened!")); } ``` @@ -403,7 +403,7 @@ try } catch (Exception ex) { - span.SetStatus(Status.Error, "Something bad happened!"); + span.SetStatus(new(StatusCode.Error, "Something bad happened!")); span.RecordException(ex) } ```