Documentation ¶
Index ¶
- func Drivers() []string
- func GetScheme() string
- func NewTracerProvider(ctx context.Context, options ...Option) (*sdktrace.TracerProvider, error)
- func Register(driver ExporterURLOpener)
- func SetDefaultScheme(scheme string)
- type EmptyOption
- type ExporterURLOpener
- type Option
- func WithOptionExporterEndpoints(v ...string) Option
- func WithOptionExporterEndpointsReplace(v ...string) Option
- func WithOptionExporters(v ...sdktrace.SpanExporter) Option
- func WithOptionExportersReplace(v ...sdktrace.SpanExporter) Option
- func WithOptionResourceAttrs(v ...attribute.KeyValue) Option
- func WithOptionResourceAttrsReplace(v ...attribute.KeyValue) Option
- func WithOptionSpanAttrs(v ...attribute.KeyValue) Option
- func WithOptionSpanAttrsReplace(v ...attribute.KeyValue) Option
- func WithOptionTracerProviderOptions(v ...sdktrace.TracerProviderOption) Option
- func WithOptionTracerProviderOptionsReplace(v ...sdktrace.TracerProviderOption) Option
- type OptionFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Drivers ¶
func Drivers() []string
Drivers returns a sorted list of the names of the registered drivers.
func NewTracerProvider ¶
func Register ¶
func Register(driver ExporterURLOpener)
Register makes a driver available by the provided name. If Register is called twice with the same name or if driver is nil, it panics.
func SetDefaultScheme ¶
func SetDefaultScheme(scheme string)
SetDefaultScheme sets the default scheme that will be used. The default scheme is "passthrough".
NOTE: this function must only be called during initialization time (i.e. in an init() function), and is not thread-safe. The scheme set last overrides previously set values.
Types ¶
type EmptyOption ¶
type EmptyOption struct{}
EmptyOption does not alter the configuration. It can be embedded in another structure to build custom options.
This API is EXPERIMENTAL.
type ExporterURLOpener ¶
type ExporterURLOpener interface { // OpenExporterURL creates a new exporter for the given target. OpenExporterURL(ctx context.Context, u *url.URL) (sdktrace.SpanExporter, error) // Scheme returns the scheme supported by this exporter. // Scheme is defined at https://github.com/grpc/grpc/blob/master/doc/naming.md. Scheme() string }
ExporterURLOpener represents types that can open metric exporters based on a URL. The opener must not modify the URL argument. OpenExporterURL must be safe to call from multiple goroutines.
This interface is generally implemented by types in driver packages.
func Get ¶
func Get(scheme string) ExporterURLOpener
Get returns the metric url opener registered with the given scheme.
If no driver is register with the scheme, nil will be returned.
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
A Option sets options.
func WithOptionExporterEndpoints ¶
WithOptionExporterEndpoints appends ExporterEndpoints in option. ExporterEndpoints is the target endpoint URL (scheme, host, port, path) the Exporter will connect to.
func WithOptionExporterEndpointsReplace ¶
WithOptionExporterEndpointsReplace sets ExporterEndpoints in option. ExporterEndpoints is the target endpoint URL (scheme, host, port, path) the Exporter will connect to.
func WithOptionExporters ¶
func WithOptionExporters(v ...sdktrace.SpanExporter) Option
WithOptionExporters appends Exporters in option.
func WithOptionExportersReplace ¶
func WithOptionExportersReplace(v ...sdktrace.SpanExporter) Option
WithOptionExportersReplace sets Exporters in option.
func WithOptionResourceAttrs ¶
WithOptionResourceAttrs appends ResourceAttrs in option.
func WithOptionResourceAttrsReplace ¶
WithOptionResourceAttrsReplace sets ResourceAttrs in option.
func WithOptionSpanAttrs ¶
WithOptionSpanAttrs appends SpanAttrs in option.
func WithOptionSpanAttrsReplace ¶
WithOptionSpanAttrsReplace sets SpanAttrs in option.
func WithOptionTracerProviderOptions ¶
func WithOptionTracerProviderOptions(v ...sdktrace.TracerProviderOption) Option
WithOptionTracerProviderOptions appends TracerProviderOptions in option.
func WithOptionTracerProviderOptionsReplace ¶
func WithOptionTracerProviderOptionsReplace(v ...sdktrace.TracerProviderOption) Option
WithOptionTracerProviderOptionsReplace sets TracerProviderOptions in option.
type OptionFunc ¶
type OptionFunc func(*option)
OptionFunc wraps a function that modifies option into an implementation of the Option interface.