gitlab.com/gitlab-org/labkit@v1.21.0/tracing/impl/static_tracer.go (about)

     1  // +build tracer_static
     2  
     3  package impl
     4  
     5  import (
     6  	"fmt"
     7  	"io"
     8  
     9  	opentracing "github.com/opentracing/opentracing-go"
    10  )
    11  
    12  // New will instantiate a new instance of the tracer, given the driver and configuration.
    13  func New(driverName string, config map[string]string) (opentracing.Tracer, io.Closer, error) {
    14  	factory := registry[driverName]
    15  	if factory == nil {
    16  		return nil, nil, fmt.Errorf("tracer: unable to load driver %s: %w", driverName, ErrConfiguration)
    17  	}
    18  
    19  	return factory(config)
    20  }