Commit c8d70e9 1 parent 8ffbcbc commit c8d70e9 Copy full SHA for c8d70e9
File tree 1 file changed +4
-4
lines changed
content/en/docs/languages/net
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -371,8 +371,8 @@ using var span = tracer.StartActiveSpan("another-span", links: links);
371
371
372
372
A [ status] ( /docs/concepts/signals/traces/#span-status ) can be set on a span,
373
373
typically used to specify that a span has not completed successfully -
374
- ` Status .Error` . In rare scenarios, you could override the ` Error ` status with
375
- ` Ok ` , but don't set ` Ok ` on successfully-completed spans.
374
+ ` StatusCode .Error` . In rare scenarios, you could override the ` Error ` status
375
+ with ` Ok ` , but don't set ` Ok ` on successfully-completed spans.
376
376
377
377
The status can be set at any time before the span is finished:
378
378
385
385
}
386
386
catch (Exception ex )
387
387
{
388
- span .SetStatus (Status .Error , " Something bad happened!" );
388
+ span .SetStatus (new ( StatusCode .Error , " Something bad happened!" ) );
389
389
}
390
390
```
391
391
403
403
}
404
404
catch (Exception ex )
405
405
{
406
- span .SetStatus (Status .Error , " Something bad happened!" );
406
+ span .SetStatus (new ( StatusCode .Error , " Something bad happened!" ) );
407
407
span .RecordException (ex )
408
408
}
409
409
```
You can’t perform that action at this time.
0 commit comments