zipkin

package
v1.13.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 28, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package zipkin allows converting model.Trace to/from zipkin.thrift model.

Index

Constants

View Source
const (
	// UnknownServiceName is serviceName we give to model.Proces if we cannot find it anywhere in a Zipkin span
	UnknownServiceName = "unknown-service-name"
)

Variables

View Source
var (

	// DefaultLogFieldKey is the log field key which translates directly into Zipkin's Annotation.Value,
	// provided it's the only field in the log.
	// In all other cases the fields are encoded into Annotation.Value as JSON string.
	// TODO move to domain model
	DefaultLogFieldKey = "event"

	// IPTagName is the Jaeger tag name for an IPv4/IPv6 IP address.
	// TODO move to domain model
	IPTagName = "ip"
)

Functions

func DeserializeThrift added in v1.9.0

func DeserializeThrift(b []byte) ([]*zipkincore.Span, error)

DeserializeThrift decodes Thrift bytes to a list of spans.

func SerializeThrift added in v1.9.0

func SerializeThrift(spans []*zipkincore.Span) []byte

SerializeThrift is only used in tests.

func ToDomain

func ToDomain(zSpans []*zipkincore.Span) (*model.Trace, error)

ToDomain transforms a trace in zipkin.thrift format into model.Trace. The transformation assumes that all spans have the same Trace ID. A valid model.Trace is always returned, even when there are errors. The errors are more of an "fyi", describing issues in the data. TODO consider using different return type instead of `error`.

func ToDomainSpan

func ToDomainSpan(zSpan *zipkincore.Span) ([]*model.Span, error)

ToDomainSpan transforms a span in zipkin.thrift format into model.Span. A valid model.Span is always returned, even when there are errors. The errors are more of an "fyi", describing issues in the data. TODO consider using different return type instead of `error`.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL