Documentation ¶
Index ¶
- func Attribute(key string, value interface{}) attribute.KeyValue
- type Event
- type SpanRecorder
- func (sr *SpanRecorder) Ended() []sdktrace.ReadOnlySpan
- func (sr *SpanRecorder) ForceFlush(context.Context) error
- func (sr *SpanRecorder) OnEnd(s sdktrace.ReadOnlySpan)
- func (sr *SpanRecorder) OnStart(_ context.Context, s sdktrace.ReadWriteSpan)
- func (sr *SpanRecorder) Shutdown(context.Context) error
- func (sr *SpanRecorder) Started() []sdktrace.ReadWriteSpan
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Event ¶
type Event struct { // Name is the name of this event Name string // Attributes describe the aspects of the event. Attributes []attribute.KeyValue // DroppedAttributeCount is the number of attributes that were not // recorded due to configured limits being reached. DroppedAttributeCount int // Time at which this event was recorded. Time time.Time }
Event is a thing that happened during a Span's lifetime. Taken from https://github.com/open-telemetry/opentelemetry-go/blob/sdk/v1.16.0/sdk/trace/event.go.
type SpanRecorder ¶
type SpanRecorder struct {
// contains filtered or unexported fields
}
SpanRecorder records started and ended spans.
func NewSpanRecorder ¶
func NewSpanRecorder() *SpanRecorder
NewSpanRecorder returns a new initialized SpanRecorder.
func (*SpanRecorder) Ended ¶
func (sr *SpanRecorder) Ended() []sdktrace.ReadOnlySpan
Ended returns a copy of all ended spans that have been recorded.
This method is safe to be called concurrently.
func (*SpanRecorder) ForceFlush ¶
func (sr *SpanRecorder) ForceFlush(context.Context) error
ForceFlush does nothing.
This method is safe to be called concurrently.
func (*SpanRecorder) OnEnd ¶
func (sr *SpanRecorder) OnEnd(s sdktrace.ReadOnlySpan)
OnEnd records completed spans.
This method is safe to be called concurrently.
func (*SpanRecorder) OnStart ¶
func (sr *SpanRecorder) OnStart(_ context.Context, s sdktrace.ReadWriteSpan)
OnStart records started spans.
This method is safe to be called concurrently.
func (*SpanRecorder) Shutdown ¶
func (sr *SpanRecorder) Shutdown(context.Context) error
Shutdown does nothing.
This method is safe to be called concurrently.
func (*SpanRecorder) Started ¶
func (sr *SpanRecorder) Started() []sdktrace.ReadWriteSpan
Started returns a copy of all started spans that have been recorded.
This method is safe to be called concurrently.