-
Notifications
You must be signed in to change notification settings - Fork 475
Open
Labels
bugunintended behavior that has to be fixedunintended behavior that has to be fixed
Description
Tracer Version(s)
1.70.0
Go Version(s)
go1.22.0
Bug Report

func recordErrorFromCtx(ctx context.Context, err error, markFailure bool, attrs ...attribute.KeyValue) {
if err == nil {
return
}
span := trace.SpanFromContext(ctx)
if markFailure {
span.SetStatus(codes.Error, err.Error())
}
span.RecordError(err, trace.WithStackTrace(true), trace.WithAttributes(attrs...))
}
But it is not adding any attributes to that span and neither am I getting proper stacktrace
And by seeing the stacktrace that I am getting it seems like the it is overwriting the actual stacktrace with the otel's internal middlewares and interceptors and I am getting the stacktrace of the last executed function for each and every error
Reproduction Code
No response
Error Logs
No response
Go Env Output
No response
mtoffl01
Metadata
Metadata
Assignees
Labels
bugunintended behavior that has to be fixedunintended behavior that has to be fixed