Documentation ¶
Index ¶
- type HTTPTracer
- type NopTracer
- func (t *NopTracer) Bool(key string, val bool)
- func (t *NopTracer) End()
- func (t *NopTracer) Err(err error)
- func (t *NopTracer) F64(key string, val float64)
- func (t *NopTracer) I64(key string, val int64)
- func (t *NopTracer) SetAttrs(attrMap map[string]interface{})
- func (t *NopTracer) Start(ctx context.Context, name string, attrs map[string]interface{}) Tracer
- func (t *NopTracer) Str(key, val string)
- func (t *NopTracer) TraceID() string
- type OTELTracer
- func (t *OTELTracer) Bool(key string, val bool)
- func (t *OTELTracer) End()
- func (t *OTELTracer) Err(err error)
- func (t *OTELTracer) F64(key string, val float64)
- func (t *OTELTracer) I64(key string, val int64)
- func (t *OTELTracer) SetAttrs(attrMap map[string]interface{})
- func (t *OTELTracer) Start(ctx context.Context, name string, attrMap map[string]interface{}) Tracer
- func (t *OTELTracer) Str(key, val string)
- func (t *OTELTracer) TraceID() string
- type OTELTracerConfig
- type SpanTracer
- func (s *SpanTracer) Bool(key string, val bool)
- func (s *SpanTracer) End()
- func (s *SpanTracer) Err(err error)
- func (s *SpanTracer) F64(key string, val float64)
- func (s *SpanTracer) I64(key string, val int64)
- func (s *SpanTracer) SetAttrs(attrMap map[string]interface{})
- func (s *SpanTracer) Start(ctx context.Context, name string, attrMap map[string]interface{}) Tracer
- func (s *SpanTracer) Str(key, val string)
- func (s *SpanTracer) TraceID() string
- type Tracer
- type TracerBuilderFn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPTracer ¶
type NopTracer ¶
type NopTracer struct { }
NopTracer is a tracer that does nothing
type OTELTracer ¶
type OTELTracer struct {
// contains filtered or unexported fields
}
OTELTracer is a tracer that does nothing
func (*OTELTracer) Bool ¶
func (t *OTELTracer) Bool(key string, val bool)
Bool adds a tag to the trace of type bool.
func (*OTELTracer) F64 ¶
func (t *OTELTracer) F64(key string, val float64)
F64 adds a tag to the trace of type float64.
func (*OTELTracer) I64 ¶
func (t *OTELTracer) I64(key string, val int64)
I64 adds a tag to the trace of type int64.
func (*OTELTracer) SetAttrs ¶
func (t *OTELTracer) SetAttrs(attrMap map[string]interface{})
func (*OTELTracer) Str ¶
func (t *OTELTracer) Str(key, val string)
Str adds a tag to the trace of type string.
func (*OTELTracer) TraceID ¶
func (t *OTELTracer) TraceID() string
TraceID returns the ID for the current trace.
type OTELTracerConfig ¶
type OTELTracerConfig struct { Host string `json:"host"` Port int `json:"port"` UseHTTP bool `json:"use_http"` SampleRate float64 `json:"sample_rate"` }
func (*OTELTracerConfig) Clean ¶
func (c *OTELTracerConfig) Clean() *OTELTracerConfig
func (OTELTracerConfig) String ¶
func (c OTELTracerConfig) String() string
type SpanTracer ¶
type SpanTracer struct {
// contains filtered or unexported fields
}
func (*SpanTracer) Bool ¶
func (s *SpanTracer) Bool(key string, val bool)
Bool adds a tag to the trace of type bool.
func (*SpanTracer) F64 ¶
func (s *SpanTracer) F64(key string, val float64)
F64 adds a tag to the trace of type float64.
func (*SpanTracer) I64 ¶
func (s *SpanTracer) I64(key string, val int64)
I64 adds a tag to the trace of type int64.
func (*SpanTracer) SetAttrs ¶
func (s *SpanTracer) SetAttrs(attrMap map[string]interface{})
func (*SpanTracer) Str ¶
func (s *SpanTracer) Str(key, val string)
Str adds a tag to the trace of type string.
func (*SpanTracer) TraceID ¶
func (s *SpanTracer) TraceID() string
TraceID returns the ID for the current trace.
type Tracer ¶
type Tracer interface { attrs.Attributable // Start begins a tracer span. Start(ctx context.Context, name string, attrs map[string]interface{}) Tracer // End marks the end of this span. End() // TraceID returns the ID for the current trace. TraceID() string // Err adds an error to the trace. Err(err error) }
Tracer defines a basic interface to create traces.
type TracerBuilderFn ¶
TracerBuilderFn defines the function type to create a new Tracer
func NewNopTracerBuilder ¶
func NewNopTracerBuilder() TracerBuilderFn
NewNopTracerBuilder returns a function to crate new tracers.
func NewOTELTracerBuilder ¶
func NewOTELTracerBuilder(ctx context.Context, l logs.Logger, cfg *OTELTracerConfig, serviceName string, serviceVersion string) TracerBuilderFn
NewOTELTracerBuilder returns a function to crate new tracers.