Documentation
¶
Index ¶
- Constants
- func SetDefaultTracer(t *Tracer)
- type Span
- func (s *Span) Close()
- func (s *Span) CloseWithError(err error)
- func (s *Span) CloseWithOutput(output any)
- func (s *Span) MergeAttributes(md map[string]any)
- func (s *Span) SetAttribute(key string, value any)
- func (s *Span) SetContext(key string, value any)
- func (s *Span) SetError(err error)
- func (s *Span) SetExpected(expected any)
- func (s *Span) SetMetric(key string, value float64)
- func (s *Span) SetOutput(output any)
- func (s *Span) SetTag(tag ...string)
- type SpanOption
- type SpanType
- type Tracer
Constants ¶
View Source
const SpanBufferSize = 1000
Variables ¶
This section is empty.
Functions ¶
func SetDefaultTracer ¶
func SetDefaultTracer(t *Tracer)
Types ¶
type Span ¶
type Span struct {
// contains filtered or unexported fields
}
func (*Span) CloseWithError ¶
func (*Span) CloseWithOutput ¶
func (*Span) MergeAttributes ¶
func (*Span) SetAttribute ¶
func (*Span) SetContext ¶
func (*Span) SetExpected ¶
type SpanOption ¶
type SpanOption func(*Span)
func Attr ¶
func Attr(key string, value any) SpanOption
func Attrs ¶
func Attrs(md map[string]any) SpanOption
func Context ¶
func Context(key string, value any) SpanOption
func Input ¶
func Input(input any) SpanOption
func Kind ¶
func Kind(t SpanType) SpanOption
func Metric ¶
func Metric(key string, value float64) SpanOption
func Tag ¶
func Tag(tag ...string) SpanOption
type Tracer ¶
type Tracer struct {
// contains filtered or unexported fields
}
func DefaultTracer ¶
func DefaultTracer() *Tracer
func NewTracer ¶
func NewTracer(cli braintrust.Client, project string, opts ...SpanOption) *Tracer
Click to show internal directories.
Click to hide internal directories.