Welcome to mirror list, hosted at ThFree Co, Russian Federation.

option.go « opentracer « ddtrace « dd-trace-go.v1 « DataDog « gopkg.in « vendor - gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: cbae45184450a6ddf03e7d1a5a9b321c95387bf9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package opentracer // import "gopkg.in/DataDog/dd-trace-go.v1/ddtrace/opentracer"

import (
	"gopkg.in/DataDog/dd-trace-go.v1/ddtrace/ext"

	opentracing "github.com/opentracing/opentracing-go"
)

// ServiceName can be used with opentracing.StartSpan to set the
// service name of a span.
func ServiceName(name string) opentracing.StartSpanOption {
	return opentracing.Tag{Key: ext.ServiceName, Value: name}
}

// ResourceName can be used with opentracing.StartSpan to set the
// resource name of a span.
func ResourceName(name string) opentracing.StartSpanOption {
	return opentracing.Tag{Key: ext.ResourceName, Value: name}
}

// SpanType can be used with opentracing.StartSpan to set the type of a span.
func SpanType(name string) opentracing.StartSpanOption {
	return opentracing.Tag{Key: ext.SpanType, Value: name}
}