|
9 | 9 | "github.com/microsoft/ApplicationInsights-Go/appinsights/contracts"
|
10 | 10 | "go.opentelemetry.io/collector/pdata/pcommon"
|
11 | 11 | "go.opentelemetry.io/collector/pdata/plog"
|
12 |
| - conventions "go.opentelemetry.io/collector/semconv/v1.12.0" |
| 12 | + conventions "go.opentelemetry.io/otel/semconv/v1.27.0" |
13 | 13 | "go.uber.org/zap"
|
14 | 14 |
|
15 | 15 | "github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/traceutil"
|
@@ -184,18 +184,18 @@ func isEventData(attrMap pcommon.Map) bool {
|
184 | 184 | }
|
185 | 185 |
|
186 | 186 | func isExceptionData(attributes pcommon.Map) bool {
|
187 |
| - return hasOneOfKeys(attributes, conventions.AttributeExceptionType, conventions.AttributeExceptionMessage) |
| 187 | + return hasOneOfKeys(attributes, string(conventions.ExceptionTypeKey), string(conventions.ExceptionMessageKey)) |
188 | 188 | }
|
189 | 189 |
|
190 | 190 | func mapIncomingAttributeMapExceptionDetail(attributemap pcommon.Map) *contracts.ExceptionDetails {
|
191 | 191 | exceptionDetails := contracts.NewExceptionDetails()
|
192 |
| - if message, exists := attributemap.Get(conventions.AttributeExceptionMessage); exists { |
| 192 | + if message, exists := attributemap.Get(string(conventions.ExceptionMessageKey)); exists { |
193 | 193 | exceptionDetails.Message = message.Str()
|
194 | 194 | }
|
195 |
| - if typeName, exists := attributemap.Get(conventions.AttributeExceptionType); exists { |
| 195 | + if typeName, exists := attributemap.Get(string(conventions.ExceptionTypeKey)); exists { |
196 | 196 | exceptionDetails.TypeName = typeName.Str()
|
197 | 197 | }
|
198 |
| - if stackTrace, exists := attributemap.Get(conventions.AttributeExceptionStacktrace); exists { |
| 198 | + if stackTrace, exists := attributemap.Get(string(conventions.ExceptionStacktraceKey)); exists { |
199 | 199 | exceptionDetails.HasFullStack = true
|
200 | 200 | exceptionDetails.Stack = stackTrace.Str()
|
201 | 201 | }
|
|
0 commit comments