Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrLimitedReaderLimitReached = errors.New("read limit reached")
ErrLimitedReaderLimitReached indicates that the read limit has been reached.
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 *Payload, statsProcessor StatsProcessor) *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.
type Payload ¶
type Payload struct { // Source specifies information about the source of these traces, such as: // language, interpreter, tracer version, etc. Source *info.TagStats // 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 // Traces contains all the traces received in the payload Traces pb.Traces // ClientComputedTopLevel specifies that the client has already marked top-level // spans. ClientComputedTopLevel bool // ClientComputedStats reports whether the client has computed and sent over stats // so that the agent doesn't have to. ClientComputedStats bool // ClientDroppedP0s specifies the number of P0 traces chunks dropped by the client. ClientDroppedP0s int64 }
Payload specifies information about a set of traces received by the API.
type StatsProcessor ¶
type StatsProcessor interface { // ProcessStats takes a stats payload and consumes it. It is considered to be originating // from the given lang. ProcessStats(p pb.ClientStatsPayload, lang, tracerVersion string) }
StatsProcessor implementations are able to process incoming client stats.