Documentation
¶
Index ¶
- func CopyTracingAnnotations(src, dst map[string]string)
- func DeserializeSpanContext(ssc string) (sc opentrace.SpanContext, ok bool)
- func GetBackgroundContextWithSpan(ls *LogSpan) context.Context
- func GetSpanContext(annotations map[string]string) string
- func GetUpdateUUID(annotations map[string]string) string
- func InsertAnnotations(annotations map[string]string, span *LogSpan, uuid string) map[string]string
- func StringAttribute(key, value string) opentrace.Attribute
- type LogSpan
- func (s *LogSpan) Annotate(attributes []opentrace.Attribute, str string)
- func (s *LogSpan) End(err error)
- func (s *LogSpan) EndSpan()
- func (s *LogSpan) Log(format string, a ...interface{})
- func (s *LogSpan) MarkAsEntitySpan(entityPath string, entity string)
- func (s *LogSpan) SerializeSpanContext() string
- func (s *LogSpan) SetError(err error) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyTracingAnnotations ¶
CopyTracingAnnotations copies the tracing data from the source annotations map to the destination annotations map.
func DeserializeSpanContext ¶
func DeserializeSpanContext(ssc string) (sc opentrace.SpanContext, ok bool)
DeserializeSpanContext returns a SpanContext for given text representation.
func GetBackgroundContextWithSpan ¶
GetBackgroundContextWithSpan get a background context with an existing span
func GetSpanContext ¶
GetSpanContext returns the string representing the SpanContext kept in annotations.
func GetUpdateUUID ¶
GetUpdateUUID returns the string representing the update UUID.
func InsertAnnotations ¶
InsertAnnotations inserts serialized span context and update uuid to the annotations map.
func StringAttribute ¶
StringAttribute is equivalent to opentrace.StringAttribute.
Types ¶
type LogSpan ¶
type LogSpan struct {
// contains filtered or unexported fields
}
LogSpan wraps a trace.Span type and adds logging when starting/ending span.
func NewSpanWithRemoteParent ¶
func NewSpanWithRemoteParent(ctx context.Context, parentSerialized string, args ...string) (context.Context, *LogSpan)
NewSpanWithRemoteParent starts a new child span of the span from the given parent.
func (*LogSpan) End ¶
End calls End() function on span and logs information about it. Sets status in case of error.
func (*LogSpan) EndSpan ¶
func (s *LogSpan) EndSpan()
EndSpan calls End() function on span and logs information about it. Sets status in case of error.
func (*LogSpan) MarkAsEntitySpan ¶
MarkAsEntitySpan creates a new Span and logs information about it.
func (*LogSpan) SerializeSpanContext ¶
SerializeSpanContext returns a string which is a text representation of the SpanContext