chore: reformat code (#2925)

This commit is contained in:
Kevin Wan
2023-02-26 09:35:59 +08:00
committed by GitHub
parent 3bc40d9eaf
commit a5e5f04bcf
4 changed files with 21 additions and 30 deletions

View File

@@ -14,11 +14,7 @@ var mongoCmdAttributeKey = attribute.Key("mongo.cmd")
func startSpan(ctx context.Context, cmd string) (context.Context, oteltrace.Span) {
tracer := trace.TracerFromContext(ctx)
ctx, span := tracer.Start(ctx,
spanName,
oteltrace.WithSpanKind(oteltrace.SpanKindClient),
)
ctx, span := tracer.Start(ctx, spanName, oteltrace.WithSpanKind(oteltrace.SpanKindClient))
span.SetAttributes(mongoCmdAttributeKey.String(cmd))
return ctx, span