observer/pkg/tracer/event.go

15 lines
276 B
Go
Raw Normal View History

2024-04-30 10:41:05 +00:00
package tracer
import (
2024-04-30 12:42:05 +00:00
"git.ma-al.com/gora_filip/observer/pkg/level"
2024-04-30 10:41:05 +00:00
"go.opentelemetry.io/otel/codes"
"go.opentelemetry.io/otel/trace"
)
func RecordError(span trace.Span, err error) error {
span.SetStatus(codes.Error, err.Error())
span.RecordError(err)
return nil
}