mirror of
https://github.com/golang/go
synced 2024-10-01 07:28:35 -06:00
75aaabac35
also change the return type to be and end function and not an incomplete span Change-Id: Icd99d93ac98a0f8088f33e905cf1ee3fe410c024 Reviewed-on: https://go-review.googlesource.com/c/tools/+/185349 Run-TryBot: Ian Cottrell <iancottrell@google.com> Reviewed-by: Rebecca Stambler <rstambler@golang.org>
17 lines
437 B
Go
17 lines
437 B
Go
// Copyright 2019 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
// Package tag adds support for telemetry tracing.
|
|
package trace
|
|
|
|
import (
|
|
"context"
|
|
|
|
"golang.org/x/tools/internal/lsp/telemetry/tag"
|
|
)
|
|
|
|
func StartSpan(ctx context.Context, name string, tags ...tag.Tag) (context.Context, func()) {
|
|
return tag.With(ctx, tags...), func() {}
|
|
}
|