Skip to content

Commit

Permalink
make golang workaround more clear
Browse files Browse the repository at this point in the history
  • Loading branch information
mabdinur authored Nov 25, 2024
1 parent 920ec93 commit a0d2cfb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions utils/build/docker/golang/parametric/otel.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ func (s *apmClientServer) OtelStartSpan(args OtelStartSpanArgs) (OtelStartSpanRe
}
var otelOpts []otel_trace.SpanStartOption
if args.SpanKind != nil {
// SpanKindUnspecified is not supported by the parametric interface.
// SpanKind needs to be remapped (incremented by 1) to match the expected value golang value.
// https://github.com/open-telemetry/opentelemetry-go/blob/e98ef1bfdb4cc413a019ebdb64988e17bb331942/trace/span.go#L120
otelOpts = append(otelOpts, otel_trace.WithSpanKind(otel_trace.ValidateSpanKind(otel_trace.SpanKind(*args.SpanKind + 1))))
}
if t := args.Timestamp; t != nil {
Expand Down

0 comments on commit a0d2cfb

Please sign in to comment.