Documentation ¶
Index ¶
- Variables
- func Close() error
- func Enabled() bool
- func Endpoints() []string
- func Provider() string
- func Register(name string, s Tracer, newFunc func(serviceName string) (Tracer, error))
- func SetLevel(lvl Level)
- func SetStd(t Tracer)
- func StartSpan(lvl Level, operationName string, opts ...opentracing.StartSpanOption) opentracing.Span
- func StartSpanFromContext(ctx context.Context, lvl Level, operationName string, ...) (opentracing.Span, context.Context)
- func Tracers() []string
- type Level
- func (i Level) IsALevel() bool
- func (i Level) MarshalJSON() ([]byte, error)
- func (i Level) MarshalText() ([]byte, error)
- func (i Level) MarshalYAML() (interface{}, error)
- func (i *Level) Scan(value interface{}) error
- func (i Level) String() string
- func (i *Level) UnmarshalJSON(data []byte) error
- func (i *Level) UnmarshalText(text []byte) error
- func (i *Level) UnmarshalYAML(unmarshal func(interface{}) error) error
- func (i Level) Value() (driver.Value, error)
- type Tracer
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Version = "0.2.0" BuildDate = "undefined" GitCommit = "undefined" )
View Source
var ( // Config holds the data read by rai-project/config Config = &tracerConfig{ done: make(chan struct{}), Level: NO_TRACE, } )
Functions ¶
func StartSpan ¶
func StartSpan(lvl Level, operationName string, opts ...opentracing.StartSpanOption) opentracing.Span
func StartSpanFromContext ¶
func StartSpanFromContext(ctx context.Context, lvl Level, operationName string, opts ...opentracing.StartSpanOption) (opentracing.Span, context.Context)
Types ¶
type Level ¶
type Level int32
func LevelFromName ¶
func LevelString ¶
LevelString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func (Level) IsALevel ¶
IsALevel returns "true" if the value is listed in the enum definition. "false" otherwise
func (Level) MarshalJSON ¶
MarshalJSON implements the json.Marshaler interface for Level
func (Level) MarshalText ¶
MarshalText implements the encoding.TextMarshaler interface for Level
func (Level) MarshalYAML ¶
MarshalYAML implements a YAML Marshaler for Level
func (*Level) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface for Level
func (*Level) UnmarshalText ¶
UnmarshalText implements the encoding.TextUnmarshaler interface for Level
func (*Level) UnmarshalYAML ¶
UnmarshalYAML implements a YAML Unmarshaler for Level
type Tracer ¶
type Tracer interface { opentracing.Tracer ID() string StartSpanFromContext(ctx context.Context, operationName string, opts ...opentracing.StartSpanOption) (opentracing.Span, context.Context) io.Closer Init(serviceName string) error Name() string Level() Level SetLevel(Level) Endpoints() []string }
func NewFromName ¶
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
grpc
`grpc_opentracing` adds OpenTracing OpenTracing Interceptors These are both client-side and server-side interceptors for OpenTracing.
|
`grpc_opentracing` adds OpenTracing OpenTracing Interceptors These are both client-side and server-side interceptors for OpenTracing. |
Click to show internal directories.
Click to hide internal directories.