diff --git a/internal/fs/wrappers/monitoring.go b/internal/fs/wrappers/monitoring.go index 563afee7c0..f64fccae34 100644 --- a/internal/fs/wrappers/monitoring.go +++ b/internal/fs/wrappers/monitoring.go @@ -30,8 +30,6 @@ import ( "go.opencensus.io/stats" "go.opencensus.io/stats/view" "go.opencensus.io/tag" - "go.opentelemetry.io/otel/codes" - "go.opentelemetry.io/otel/trace" ) var ( @@ -329,16 +327,9 @@ func (fs *monitoring) Destroy() { type wrappedCall func() error func invokeWrapped(ctx context.Context, opName string, w wrappedCall) error { - ctx, span := monitor.StartSpan(ctx, opName, trace.WithSpanKind(trace.SpanKindServer)) - defer span.End() startTime := time.Now() err := w() - if err != nil { - span.RecordError(err) - span.SetStatus(codes.Error, err.Error()) - } - recordOp(ctx, opName, startTime, err) return err } diff --git a/internal/fs/wrappers/monitoring_test.go b/internal/fs/wrappers/monitoring_test.go index 4feb2b6a2d..efd2850f87 100644 --- a/internal/fs/wrappers/monitoring_test.go +++ b/internal/fs/wrappers/monitoring_test.go @@ -26,7 +26,6 @@ import ( "go.opentelemetry.io/otel" sdktrace "go.opentelemetry.io/otel/sdk/trace" "go.opentelemetry.io/otel/sdk/trace/tracetest" - "go.opentelemetry.io/otel/trace" ) func TestFsErrStrAndCategory(t *testing.T) { @@ -246,7 +245,5 @@ func TestSpan(t *testing.T) { require.NoError(t, err) ss := ex.GetSpans() - require.Len(t, ss, 1) - assert.Equal(t, "StatFS", ss[0].Name) - assert.Equal(t, trace.SpanKindServer, ss[0].SpanKind) + require.Len(t, ss, 0) }