api

package
v0.0.0-...-dca2ff9 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2020 License: Apache-2.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MaxServiceLen the maximum length a service can have
	MaxServiceLen = 100
	// MaxNameLen the maximum length a name can have
	MaxNameLen = 100
	// MaxTypeLen the maximum length a span type can have
	MaxTypeLen = 100
	// DefaultServiceName is the default name we assign a service if it's missing and we have no reasonable fallback
	DefaultServiceName = "unnamed-service"
	// DefaultSpanName is the default name we assign a span if it's missing and we have no reasonable fallback
	DefaultSpanName = "unnamed-operation"
)

Variables

View Source
var ErrLimitedReaderLimitReached = errors.New("read limit reached")

ErrLimitedReaderLimitReached indicates that the read limit has been reached.

View Source
var (
	// Year2000NanosecTS is an arbitrary cutoff to spot weird-looking values
	Year2000NanosecTS = time.Date(2000, time.January, 1, 0, 0, 0, 0, time.UTC).UnixNano()
)

Functions

This section is empty.

Types

type HTTPReceiver

type HTTPReceiver struct {
	Stats       *info.ReceiverStats
	RateLimiter *rateLimiter
	// contains filtered or unexported fields
}

HTTPReceiver is a collector that uses HTTP protocol and just holds a chan where the spans received are sent one by one

func NewHTTPReceiver

func NewHTTPReceiver(conf *config.AgentConfig, dynConf *sampler.DynamicConfig, out chan *Trace) *HTTPReceiver

NewHTTPReceiver returns a pointer to a new HTTPReceiver

func (*HTTPReceiver) Languages

func (r *HTTPReceiver) Languages() string

Languages returns the list of the languages used in the traces the agent receives.

func (*HTTPReceiver) Start

func (r *HTTPReceiver) Start()

Start starts doing the HTTP server and is ready to receive traces

func (*HTTPReceiver) Stop

func (r *HTTPReceiver) Stop() error

Stop stops the receiver and shuts down the HTTP server.

type LimitedReader

type LimitedReader struct {
	Count int64
	// contains filtered or unexported fields
}

LimitedReader reads from a reader up to a specific limit. When this limit has been reached, any subsequent read will return ErrLimitedReaderLimitReached. The underlying reader has to implement io.ReadCloser so that it can be used with http request bodies.

func NewLimitedReader

func NewLimitedReader(r io.ReadCloser, limit int64) *LimitedReader

NewLimitedReader creates a new LimitedReader.

func (*LimitedReader) Close

func (r *LimitedReader) Close() error

Close closes the underlying reader.

func (*LimitedReader) Read

func (r *LimitedReader) Read(buf []byte) (n int, err error)

Read reads from the underlying reader.

type Trace

type Trace struct {
	// Source specifies information about the source of these traces, such as:
	// language, interpreter, tracer version, etc.
	Source *info.Tags

	// ContainerTags specifies orchestrator tags corresponding to the origin of this
	// trace (e.g. K8S pod, Docker image, ECS, etc). They are of the type "k1:v1,k2:v2".
	ContainerTags string

	// Spans holds the spans of this trace.
	Spans pb.Trace
}

Trace specifies information about a trace received by the API.

type Version

type Version string

Version is a dumb way to version our collector handlers

Jump to

Keyboard shortcuts

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