| | 1 | | using System; |
| | 2 | | using System.Diagnostics; |
| | 3 | | using Microsoft.Extensions.Logging; |
| | 4 | | using OpenTelemetry.Trace; |
| | 5 | |
|
| | 6 | | namespace SeungYongShim.Akka.OpenTelemetry |
| | 7 | | { |
| | 8 | | public static class ActivityExtension |
| | 9 | | { |
| | 10 | | // https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/semantic_conventi |
| | 11 | | public static Activity AddTagException(this Activity activity, Exception ex) |
| 2 | 12 | | { |
| 2 | 13 | | activity.RecordException(ex); |
| 2 | 14 | | activity.SetStatus(Status.Error); |
| 2 | 15 | | return activity; |
| 2 | 16 | | } |
| | 17 | |
|
| | 18 | | } |
| | 19 | | } |