2019-06-14 16:32:09 -06:00
|
|
|
// 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.
|
|
|
|
|
2019-06-26 20:46:12 -06:00
|
|
|
// Package tag adds support for telemetry tracing.
|
2019-06-14 16:32:09 -06:00
|
|
|
package trace
|
|
|
|
|
2019-06-24 22:50:01 -06:00
|
|
|
import (
|
|
|
|
"context"
|
2019-06-14 16:32:09 -06:00
|
|
|
|
2019-06-26 20:46:12 -06:00
|
|
|
"golang.org/x/tools/internal/lsp/telemetry/tag"
|
2019-06-14 16:32:09 -06:00
|
|
|
)
|
|
|
|
|
2019-06-26 20:46:12 -06:00
|
|
|
func StartSpan(ctx context.Context, name string, tags ...tag.Tag) (context.Context, func()) {
|
|
|
|
return tag.With(ctx, tags...), func() {}
|
|
|
|
}
|