api

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2021 License: Apache-2.0 Imports: 52 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMeasuredListener added in v0.9.0

func NewMeasuredListener(ln net.Listener, name string) net.Listener

NewMeasuredListener wraps ln and emits metrics every 10 seconds. The metric name is datadog.trace_agent.receiver.<name>. Additionally, a "status" tag will be added with potential values "accepted", "timedout" or "errored".

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 OTLPReceiver added in v0.9.0

type OTLPReceiver struct {
	// contains filtered or unexported fields
}

OTLPReceiver implements an OpenTelemetry Collector receiver which accepts incoming data on two ports for both plain HTTP and gRPC.

func NewOTLPReceiver added in v0.9.0

func NewOTLPReceiver(out chan<- *Payload, cfg *config.OTLP) *OTLPReceiver

NewOTLPReceiver returns a new OTLPReceiver which sends any incoming traces down the out channel.

func (*OTLPReceiver) Export added in v0.9.0

Export implements otlppb.TraceServiceServer

func (*OTLPReceiver) ServeHTTP added in v0.9.0

func (o *OTLPReceiver) ServeHTTP(w http.ResponseWriter, req *http.Request)

ServeHTTP implements http.Handler

func (*OTLPReceiver) Start added in v0.9.0

func (o *OTLPReceiver) Start()

Start starts the OTLPReceiver, if any of the servers were configured as active.

func (*OTLPReceiver) Stop added in v0.9.0

func (o *OTLPReceiver) Stop()

Stop stops any running server.

type Payload added in v0.9.0

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

	// ContainerID specifies the container ID from where this payload originated, as
	// and if sent by the client.
	ContainerID string

	// 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 added in v0.9.0

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.

type Version

type Version string

Version is a dumb way to version our collector handlers

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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