Natalia Goc
ab5b70704d
Some commonly used at maal attributes have been encoded as consts with convinience wrappers similar to those of semconv package from otel sdk. Additionally some utils that can generate mutliple attributes were added.
15 lines
276 B
Go
15 lines
276 B
Go
package tracer
|
|
|
|
import (
|
|
"git.ma-al.com/gora_filip/observer/pkg/level"
|
|
"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
|
|
}
|