文档:https://godoc.org/github.com/opentracing/opentracing-go/log

专门给 span.LogFields 使用,来设置链路日志信息

type Field

  1. type Field struct {
  2. // contains filtered or unexported fields
  3. }

func Bool(key string, val bool) Field
func Error(err error) Field
func Event(val string) Field
func Float32(key string, val float32) Field
func Float64(key string, val float64) Field
func Int(key string, val int) Field
func Int32(key string, val int32) Field
func Int64(key string, val int64) Field
func Message(val string) Field
func Object(key string, obj interface{}) Field 将一个对象值键:值对添加到一个Span.LogFields()记录中
func String(key, val string) Field
func Uint32(key string, val uint32) Field
func Uint64(key string, val uint64) Field
func (lf Field) Key() string 返回所有key
func (lf Field) Marshal(visitor Encoder)
func (lf Field) String() string 返回所有键值对的字符串形式
func (lf Field) Value() interface{} 返回所有value