Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HTTPStatusCodeAttributes ¶
HTTPStatusCodeAttributes generates attributes of the HTTP namespace as specified by the OpenTelemetry specification for a span.
func UpdateHTTPClient ¶
UpdateHTTPClient updates the http client with the necessary otel transport
Types ¶
type LogrusHook ¶
type LogrusHook struct{}
LogrusHook is a logrus.Hook which adds logrus events to active spans. If the span is not recording or the span context is invalid, the hook is a no-op.
func (*LogrusHook) Fire ¶
func (h *LogrusHook) Fire(entry *log.Entry) error
Fire is called when a log event occurs.
func (*LogrusHook) Levels ¶
func (h *LogrusHook) Levels() []log.Level
Levels returns the logrus levels that this hook is interested in.
type Span ¶
type Span struct {
// contains filtered or unexported fields
}
Span is wrapper around otel trace.Span. Span is the individual component of a trace. It represents a single named and timed operation of a workflow that is traced.
func SpanFromContext ¶
SpanFromContext returns the current Span from the context.
func (*Span) RecordError ¶
func (s *Span) RecordError(err error, options ...trace.EventOption)
RecordError will record err as an exception span event for this span
func (*Span) SetAttributes ¶
SetAttributes sets kv as attributes of the span.
type SpanOpt ¶
type SpanOpt func(config *StartConfig)
func WithAttribute ¶
WithAttribute appends attributes to a new created span.
type StartConfig ¶
type StartConfig struct {
// contains filtered or unexported fields
}
StartConfig defines configuration for a new span object.