Documentation
¶
Overview ¶
Package tracing provides an abstraction of OpenTelemetry SpanExporter
Index ¶
- func InitExporters(ctx context.Context, svc otel2.Service, cfg Config) error
- func OpenTracing(ctx context.Context, urlstr string) (trace.SpanExporter, error)
- func StartLocalSpan(ctx context.Context, name string, callerSkip ...int) (context.Context, trace2.Span)
- type Config
- type URLMux
- type URLOpener
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitExporters ¶
InitExporters creates the global trace.Provider and refresh dynamic Exporters. Sample URLs: "stdout://", "jaeger://localhost:14268/api/traces",
func OpenTracing ¶
OpenTracing opens the Registry identified by the URL given. See the URLOpener documentation in driver subpackages for details on supported URL formats, and https://gocloud.dev/concepts/urls for more information.
Types ¶
type URLMux ¶
type URLMux struct {
// contains filtered or unexported fields
}
URLMux is a URL opener multiplexer. It matches the scheme of the URLs against a set of registered schemes and calls the opener that matches the URL's scheme. See https://gocloud.dev/concepts/urls/ for more information.
The zero value is a multiplexer with no registered schemes.
func DefaultURLMux ¶
func DefaultURLMux() *URLMux
DefaultURLMux returns the URLMux used by OpenTopic and OpenSubscription.
Driver packages can use this to register their TopicURLOpener and/or SubscriptionURLOpener on the mux.
func (*URLMux) OpenServer ¶
OpenServer calls OpenTopicURL with the URL parsed from urlstr. OpenTopic is safe to call from multiple goroutines.