Documentation
¶
Overview ¶
Content managed by Project Forge, see [projectforge.md] for details.
Content managed by Project Forge, see [projectforge.md] for details.
Content managed by Project Forge, see [projectforge.md] for details.
Content managed by Project Forge, see [projectforge.md] for details.
Index ¶
- func Close() error
- func Initialize(logger *zap.SugaredLogger)
- func InitializeIfNeeded(enabled bool, logger *zap.SugaredLogger) bool
- func LoggerFor(logger *zap.SugaredLogger, span *Span) *zap.SugaredLogger
- type Attribute
- type ErrHandler
- type Span
- func (s *Span) Attribute(k string, v interface{})
- func (s *Span) Attributes(attrs ...*Attribute)
- func (s *Span) Complete()
- func (s *Span) Event(name string, attrs ...*Attribute)
- func (s *Span) OnError(err error)
- func (s *Span) SetHTTPStatus(code int)
- func (s *Span) SetName(name string)
- func (s *Span) SetStatus(status string, description string)
- func (s *Span) SpanID() string
- func (s *Span) TraceID() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Initialize ¶
func Initialize(logger *zap.SugaredLogger)
func InitializeIfNeeded ¶
func InitializeIfNeeded(enabled bool, logger *zap.SugaredLogger) bool
func LoggerFor ¶ added in v0.1.35
func LoggerFor(logger *zap.SugaredLogger, span *Span) *zap.SugaredLogger
Types ¶
type Attribute ¶ added in v0.1.35
type Attribute struct {
Key string `json:"key"`
Value interface{} `json:"value"`
}
type ErrHandler ¶
type ErrHandler struct {
// contains filtered or unexported fields
}
func (*ErrHandler) Handle ¶
func (e *ErrHandler) Handle(err error)
type Span ¶ added in v0.1.35
func StartSpan ¶
func StartSpan(ctx context.Context, spanName string, logger *zap.SugaredLogger, opts ...interface{}) (context.Context, *Span, *zap.SugaredLogger)
func (*Span) Attributes ¶ added in v0.1.35
func (*Span) Complete ¶ added in v0.1.35
func (s *Span) Complete()
Complete must be called, usually through a `defer` block.
func (*Span) SetHTTPStatus ¶ added in v0.1.35
Directories
¶
| Path | Synopsis |
|---|---|
|
Content managed by Project Forge, see [projectforge.md] for details.
|
Content managed by Project Forge, see [projectforge.md] for details. |
Click to show internal directories.
Click to hide internal directories.