Skip to content

Commit bc20b0e

Browse files
Restore original pkg import
1 parent 9aa54f8 commit bc20b0e

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

worker/mutation.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import (
1919
ostats "go.opencensus.io/stats"
2020
"go.opentelemetry.io/otel"
2121
"go.opentelemetry.io/otel/attribute"
22-
oteltrace "go.opentelemetry.io/otel/trace"
22+
"go.opentelemetry.io/otel/trace"
2323
"google.golang.org/protobuf/proto"
2424

2525
"github.com/dgraph-io/badger/v4"
@@ -107,8 +107,8 @@ func runMutation(ctx context.Context, edge *pb.DirectedEdge, txn *posting.Txn) e
107107
t := time.Now()
108108
plist, err := getFn(key)
109109
if dur := time.Since(t); dur > time.Millisecond {
110-
span := oteltrace.SpanFromContext(ctx)
111-
span.AddEvent("Slow GetLru", oteltrace.WithAttributes(
110+
span := trace.SpanFromContext(ctx)
111+
span.AddEvent("Slow GetLru", trace.WithAttributes(
112112
attribute.Bool("slow-get", true),
113113
attribute.String("duration", dur.String())))
114114
}
@@ -720,9 +720,9 @@ func MutateOverNetwork(ctx context.Context, m *pb.Mutations) (*api.TxnContext, e
720720
resCh := make(chan res, len(mutationMap))
721721
for gid, mu := range mutationMap {
722722
if gid == 0 {
723-
span.AddEvent("State information", oteltrace.WithAttributes(
723+
span.AddEvent("State information", trace.WithAttributes(
724724
attribute.String("state", groups().state.String())))
725-
span.AddEvent("Group id zero for mutation", oteltrace.WithAttributes(
725+
span.AddEvent("Group id zero for mutation", trace.WithAttributes(
726726
attribute.String("mutation", mu.String())))
727727
return tctx, errNonExistentTablet
728728
}
@@ -850,11 +850,11 @@ func CommitOverNetwork(ctx context.Context, tc *api.TxnContext) (uint64, error)
850850
h := hooks.GetHooks()
851851
tctx, err := h.CommitOrAbort(ctx, tc)
852852
if err != nil {
853-
span.AddEvent("Error in CommitOrAbort", oteltrace.WithAttributes(
853+
span.AddEvent("Error in CommitOrAbort", trace.WithAttributes(
854854
attribute.String("error", err.Error())))
855855
return 0, err
856856
}
857-
span.AddEvent("Commit status", oteltrace.WithAttributes(
857+
span.AddEvent("Commit status", trace.WithAttributes(
858858
attribute.Int64("commitTs", int64(tctx.CommitTs)),
859859
attribute.Bool("committed", tctx.CommitTs > 0)))
860860

0 commit comments

Comments
 (0)