From 85e5f8f4b1ec965f419f13dbd6944c37c7cf8340 Mon Sep 17 00:00:00 2001 From: Carson Ip Date: Tue, 20 Aug 2024 10:31:44 +0100 Subject: [PATCH] Fix typo and rename file (#345) --- input/elasticapm/internal/modeldecoder/rumv3/decoder.go | 8 ++++---- input/otlp/logs.go | 2 +- input/otlp/{trace-semaphore.go => trace_semaphore.go} | 0 3 files changed, 5 insertions(+), 5 deletions(-) rename input/otlp/{trace-semaphore.go => trace_semaphore.go} (100%) diff --git a/input/elasticapm/internal/modeldecoder/rumv3/decoder.go b/input/elasticapm/internal/modeldecoder/rumv3/decoder.go index b814d9ed..782dfeef 100644 --- a/input/elasticapm/internal/modeldecoder/rumv3/decoder.go +++ b/input/elasticapm/internal/modeldecoder/rumv3/decoder.go @@ -256,7 +256,7 @@ func mapToErrorModel(from *errorEvent, event *modelpb.APMEvent) { len(from.Log.Stacktrace), modelpb.StacktraceFrameFromVTPool, ) - mapToStracktraceModel(from.Log.Stacktrace, log.Stacktrace) + mapToStacktraceModel(from.Log.Stacktrace, log.Stacktrace) } out.Log = log } @@ -320,7 +320,7 @@ func mapToExceptionModel(from *errorException, out *modelpb.Exception) { len(from.Stacktrace), modelpb.StacktraceFrameFromVTPool, ) - mapToStracktraceModel(from.Stacktrace, out.Stacktrace) + mapToStacktraceModel(from.Stacktrace, out.Stacktrace) } if from.Type.IsSet() { out.Type = from.Type.Val @@ -693,7 +693,7 @@ func mapToSpanModel(from *span, event *modelpb.APMEvent) { len(from.Stacktrace), modelpb.StacktraceFrameFromVTPool, ) - mapToStracktraceModel(from.Stacktrace, out.Stacktrace) + mapToStacktraceModel(from.Stacktrace, out.Stacktrace) } if from.Sync.IsSet() { val := from.Sync.Val @@ -706,7 +706,7 @@ func mapToSpanModel(from *span, event *modelpb.APMEvent) { } } -func mapToStracktraceModel(from []stacktraceFrame, out []*modelpb.StacktraceFrame) { +func mapToStacktraceModel(from []stacktraceFrame, out []*modelpb.StacktraceFrame) { for idx, eventFrame := range from { fr := out[idx] if eventFrame.AbsPath.IsSet() { diff --git a/input/otlp/logs.go b/input/otlp/logs.go index 2d332c8c..276f20b1 100644 --- a/input/otlp/logs.go +++ b/input/otlp/logs.go @@ -205,7 +205,7 @@ func (c *Consumer) convertLogRecord( }) // NOTE: we consider an error anything that contains an exception type - // or message, indipendently from the severity level. + // or message, independent of the severity level. if exceptionMessage != "" || exceptionType != "" { event.Error = convertOpenTelemetryExceptionSpanEvent( exceptionType, exceptionMessage, exceptionStacktrace, diff --git a/input/otlp/trace-semaphore.go b/input/otlp/trace_semaphore.go similarity index 100% rename from input/otlp/trace-semaphore.go rename to input/otlp/trace_semaphore.go