Skip to content

Commit

Permalink
Use a constant for the semconv attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
xrmx committed Dec 17, 2024
1 parent 64e886d commit d01e6fe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion input/otlp/traces.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ const (
attributeStackTrace = "code.stacktrace" // semconv 1.24 or later
attributeDataStreamDataset = "data_stream.dataset"
attributeDataStreamNamespace = "data_stream.namespace"
attributeGenAiSystem = "gen_ai.system"
)

// ConsumeTracesResult contains the number of rejected spans and error message for partial success response.
Expand Down Expand Up @@ -817,7 +818,7 @@ func TranslateSpan(spanKind ptrace.SpanKind, attributes pcommon.Map, event *mode
event.Code.Stacktrace = v.Str()

// gen_ai.*
case "gen_ai.system":
case attributeGenAiSystem:
genAiSystem = stringval
isGenAi = true

Expand Down

0 comments on commit d01e6fe

Please sign in to comment.