Version: v0.3.2 Latest Latest

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

Go to latest
Published: Nov 8, 2017 License: MIT Imports: 0 Imported by: 0




This section is empty.


This section is empty.


This section is empty.


type Flags

type Flags uint64

Flags provides the ability to create and communicate feature flags.

const (
	Debug Flags = 1 << 0

	// SamplingSet and Sampled handle Sampled tribool logic for interop with
	// instrumenting libraries / propagation channels not using a separate Sampled
	// header and potentially encoding this in flags.
	// When we receive a flag we do this:
	// 1. Sampled bit is set => true
	// 2. Sampled bit is not set => inspect SamplingSet bit.
	// 2a. SamplingSet bit is set => false
	// 2b. SamplingSet bit is not set => null
	// Note on 2b.: depending on the propagator having a separate Sampled header
	// we either assume Sampling is false or unknown. In the latter case we will
	// run our sampler even though we are not the root of the trace.
	// When propagating to a downstream service we will always be explicit and
	// will provide a set SamplingSet bit in case of our binary propagator either
	SamplingSet Flags = 1 << 1
	Sampled     Flags = 1 << 2
	// When set, we can ignore the value of the parentId. This is used for binary
	// fixed width transports or transports like proto3 that return a default
	// value if a value has not been set (thus not enabling you to distinguish
	// between the value being set to the default or not set at all).
	// While many zipkin systems re-use a trace id as the root span id, we know
	// that some don't. With this flag, we can tell for sure if the span is root
	// as opposed to the convention trace id == span id == parent id.
	IsRoot Flags = 1 << 3

Flags is a bitset

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL