Versions in this module Expand all Collapse all v0 v0.24.2 Aug 29, 2023 v0.24.1 Dec 14, 2022 Changes in this version + const DefaultMaxAnnotationEventsPerSpan + const DefaultMaxAttributesPerSpan + const DefaultMaxLinksPerSpan + const DefaultMaxMessageEventsPerSpan + const SpanKindClient + const SpanKindServer + const SpanKindUnspecified + const StatusCodeAborted + const StatusCodeAlreadyExists + const StatusCodeCancelled + const StatusCodeDataLoss + const StatusCodeDeadlineExceeded + const StatusCodeFailedPrecondition + const StatusCodeInternal + const StatusCodeInvalidArgument + const StatusCodeNotFound + const StatusCodeOK + const StatusCodeOutOfRange + const StatusCodePermissionDenied + const StatusCodeResourceExhausted + const StatusCodeUnauthenticated + const StatusCodeUnavailable + const StatusCodeUnimplemented + const StatusCodeUnknown + func ApplyConfig(cfg Config) + func NewContext(parent context.Context, s *Span) context.Context + func RegisterExporter(e Exporter) + func UnregisterExporter(e Exporter) + type Annotation struct + Attributes map[string]interface{} + Message string + Time time.Time + type Attribute struct + func BoolAttribute(key string, value bool) Attribute + func Float64Attribute(key string, value float64) Attribute + func Int64Attribute(key string, value int64) Attribute + func StringAttribute(key string, value string) Attribute + func (a *Attribute) Key() string + func (a *Attribute) Value() interface{} + type Config struct + DefaultSampler Sampler + IDGenerator internal.IDGenerator + MaxAnnotationEventsPerSpan int + MaxAttributesPerSpan int + MaxLinksPerSpan int + MaxMessageEventsPerSpan int + type Exporter interface + ExportSpan func(s *SpanData) + type Link struct + Attributes map[string]interface{} + SpanID SpanID + TraceID TraceID + Type LinkType + type LinkType int32 + const LinkTypeChild + const LinkTypeParent + const LinkTypeUnspecified + type MessageEvent struct + CompressedByteSize int64 + EventType MessageEventType + MessageID int64 + Time time.Time + UncompressedByteSize int64 + type MessageEventType int32 + const MessageEventTypeRecv + const MessageEventTypeSent + const MessageEventTypeUnspecified + type Sampler func(SamplingParameters) SamplingDecision + func AlwaysSample() Sampler + func NeverSample() Sampler + func ProbabilitySampler(fraction float64) Sampler + type SamplingDecision struct + Sample bool + type SamplingParameters struct + HasRemoteParent bool + Name string + ParentContext SpanContext + SpanID SpanID + TraceID TraceID + type Span struct + func FromContext(ctx context.Context) *Span + func NewSpan(s SpanInterface) *Span + func StartSpan(ctx context.Context, name string, o ...StartOption) (context.Context, *Span) + func StartSpanWithRemoteParent(ctx context.Context, name string, parent SpanContext, o ...StartOption) (context.Context, *Span) + func (s *Span) AddAttributes(attributes ...Attribute) + func (s *Span) AddLink(l Link) + func (s *Span) AddMessageReceiveEvent(messageID, uncompressedByteSize, compressedByteSize int64) + func (s *Span) AddMessageSendEvent(messageID, uncompressedByteSize, compressedByteSize int64) + func (s *Span) Annotate(attributes []Attribute, str string) + func (s *Span) Annotatef(attributes []Attribute, format string, a ...interface{}) + func (s *Span) End() + func (s *Span) Internal() SpanInterface + func (s *Span) IsRecordingEvents() bool + func (s *Span) SetName(name string) + func (s *Span) SetStatus(status Status) + func (s *Span) SpanContext() SpanContext + func (s *Span) String() string + type SpanContext struct + SpanID SpanID + TraceID TraceID + TraceOptions TraceOptions + Tracestate *tracestate.Tracestate + func (sc SpanContext) IsSampled() bool + type SpanData struct + Annotations []Annotation + Attributes map[string]interface{} + ChildSpanCount int + DroppedAnnotationCount int + DroppedAttributeCount int + DroppedLinkCount int + DroppedMessageEventCount int + EndTime time.Time + HasRemoteParent bool + Links []Link + MessageEvents []MessageEvent + Name string + ParentSpanID SpanID + SpanKind int + StartTime time.Time + type SpanID [8]byte + func (s SpanID) String() string + type SpanInterface interface + AddAttributes func(attributes ...Attribute) + AddLink func(l Link) + AddMessageReceiveEvent func(messageID, uncompressedByteSize, compressedByteSize int64) + AddMessageSendEvent func(messageID, uncompressedByteSize, compressedByteSize int64) + Annotate func(attributes []Attribute, str string) + Annotatef func(attributes []Attribute, format string, a ...interface{}) + End func() + IsRecordingEvents func() bool + SetName func(name string) + SetStatus func(status Status) + SpanContext func() SpanContext + String func() string + type StartOption func(*StartOptions) + func WithSampler(sampler Sampler) StartOption + func WithSpanKind(spanKind int) StartOption + type StartOptions struct + Sampler Sampler + SpanKind int + type Status struct + Code int32 + Message string + type TraceID [16]byte + func (t TraceID) String() string + type TraceOptions uint32 + func (t TraceOptions) IsSampled() bool + type Tracer interface + FromContext func(ctx context.Context) *Span + NewContext func(parent context.Context, s *Span) context.Context + StartSpan func(ctx context.Context, name string, o ...StartOption) (context.Context, *Span) + StartSpanWithRemoteParent func(ctx context.Context, name string, parent SpanContext, o ...StartOption) (context.Context, *Span) + var DefaultTracer Tracer = &tracer{}