Documentation
¶
Index ¶
- func SetGlobalLogger(l *Logger)
- type Counter
- type Histogram
- type LogExporter
- type LogLevel
- type Logger
- type LoggerOption
- type Metrics
- func (m *Metrics) DecActive()
- func (m *Metrics) IncActive()
- func (m *Metrics) IncCacheHit()
- func (m *Metrics) IncCacheMiss()
- func (m *Metrics) IncFailed()
- func (m *Metrics) IncRequests()
- func (m *Metrics) RecordBackendError(backend string)
- func (m *Metrics) RecordDuration(d time.Duration)
- func (m *Metrics) RecordToolCall(tool string)
- func (m *Metrics) Snapshot() MetricsSnapshot
- type MetricsSnapshot
- type NoopExporter
- type Span
- type SpanContext
- type SpanEvent
- type SpanKind
- type SpanStatus
- type TraceExporter
- type Tracer
- func (t *Tracer) AddSpanEvent(span *Span, name string, attrs map[string]string)
- func (t *Tracer) EndSpan(span *Span)
- func (t *Tracer) Flush()
- func (t *Tracer) SetSpanAttribute(span *Span, key, value string)
- func (t *Tracer) SetSpanStatus(span *Span, code int, message string)
- func (t *Tracer) StartSpan(ctx context.Context, name string) (context.Context, *Span)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetGlobalLogger ¶
func SetGlobalLogger(l *Logger)
Types ¶
type Histogram ¶
type Histogram struct {
// contains filtered or unexported fields
}
func NewHistogram ¶
type LogExporter ¶
type LogExporter struct{}
func (*LogExporter) Export ¶
func (e *LogExporter) Export(_ *Span) error
func (*LogExporter) Shutdown ¶
func (e *LogExporter) Shutdown() error
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
func InitLogging ¶
func NewLogger ¶
func NewLogger(opts ...LoggerOption) *Logger
type LoggerOption ¶
type LoggerOption func(*Logger)
func WithAttr ¶
func WithAttr(key, value string) LoggerOption
func WithFormat ¶
func WithFormat(format string) LoggerOption
func WithLevel ¶
func WithLevel(level LogLevel) LoggerOption
func WithOutput ¶
func WithOutput(w io.Writer) LoggerOption
type Metrics ¶
type Metrics struct {
RequestsTotal int64
RequestsActive int64
RequestsFailed int64
RequestDuration *Histogram
CacheHits int64
CacheMisses int64
BackendErrors *expvar.Map
ToolCalls *expvar.Map
// contains filtered or unexported fields
}
func NewMetrics ¶
func NewMetrics() *Metrics
func (*Metrics) IncCacheHit ¶
func (m *Metrics) IncCacheHit()
func (*Metrics) IncCacheMiss ¶
func (m *Metrics) IncCacheMiss()
func (*Metrics) IncRequests ¶
func (m *Metrics) IncRequests()
func (*Metrics) RecordBackendError ¶
func (*Metrics) RecordDuration ¶
func (*Metrics) RecordToolCall ¶
func (*Metrics) Snapshot ¶
func (m *Metrics) Snapshot() MetricsSnapshot
type MetricsSnapshot ¶
type NoopExporter ¶
type NoopExporter struct{}
func (*NoopExporter) Export ¶
func (e *NoopExporter) Export(_ *Span) error
func (*NoopExporter) Shutdown ¶
func (e *NoopExporter) Shutdown() error
type Span ¶
type SpanContext ¶
type SpanStatus ¶
type TraceExporter ¶
type Tracer ¶
type Tracer struct {
// contains filtered or unexported fields
}
func (*Tracer) AddSpanEvent ¶
func (*Tracer) SetSpanAttribute ¶
Click to show internal directories.
Click to hide internal directories.