func (c SpanContext) SpanID() SpanID {
	return c.spanID
}
SpanID returns the span ID of this span context
package jaeger
import (
	"errors"
	"fmt"
	"strconv"
	"strings"
)
const (
	flagSampled = byte(1)
	flagDebug   = byte(2)
)
var (
	errEmptyTracerStateString     = errors.New("Cannot convert empty string to tracer state")
	errMalformedTracerStateString = errors.New("String does not match tracer state format")
	emptyContext = SpanContext{}
)
type TraceID struct {
	High, Low uint64
}
type SpanID uint64
type SpanContext struct {
	traceID TraceID
	spanID SpanID
	parentID SpanID
	flags byte
	baggage map[string]string
	debugID string
}
func (c SpanContext) ForeachBaggageItem(handler func(k, v string) bool) {
	for k, v := range c.baggage {
		if !handler(k, v) {
			break
		}
	}
}
func (c SpanContext) IsSampled() bool {
	return (c.flags & flagSampled) == flagSampled
}
func (c SpanContext) IsDebug() bool {
	return (c.flags & flagDebug) == flagDebug
}
func (c SpanContext) IsValid() bool {
	return c.traceID.IsValid() && c.spanID != 0
}
func (c SpanContext) String() string {
	if c.traceID.High == 0 {
		return fmt.Sprintf("%x:%x:%x:%x", c.traceID.Low, uint64(c.spanID), uint64(c.parentID), c.flags)
	}
	return fmt.Sprintf("%x%016x:%x:%x:%x", c.traceID.High, c.traceID.Low, uint64(c.spanID), uint64(c.parentID), c.flags)
}
func ContextFromString(value string) (SpanContext, error) {
	var context SpanContext
	if value == "" {
		return emptyContext, errEmptyTracerStateString
	}
	parts := strings.Split(value, ":")
	if len(parts) != 4 {
		return emptyContext, errMalformedTracerStateString
	}
	var err error
	if context.traceID, err = TraceIDFromString(parts[0]); err != nil {
		return emptyContext, err
	}
	if context.spanID, err = SpanIDFromString(parts[1]); err != nil {
		return emptyContext, err
	}
	if context.parentID, err = SpanIDFromString(parts[2]); err != nil {
		return emptyContext, err
	}
	flags, err := strconv.ParseUint(parts[3], 10, 8)
	if err != nil {
		return emptyContext, err
	}
	context.flags = byte(flags)
	return context, nil
}
func (c SpanContext) TraceID() TraceID {
	return c.traceID
}