Documentation ¶
Index ¶
- Variables
- func HTTPDecodingError(err error, tags []string, w http.ResponseWriter)
- func HTTPEndpointNotSupported(tags []string, w http.ResponseWriter)
- func HTTPFormatError(tags []string, w http.ResponseWriter)
- func HTTPOK(w http.ResponseWriter)
- func HTTPRateByService(w http.ResponseWriter, dynConf *sampler.DynamicConfig)
- type HTTPReceiver
- type LimitedReader
- type Version
Constants ¶
This section is empty.
Variables ¶
var ErrLimitedReaderLimitReached = errors.New("read limit reached")
ErrLimitedReaderLimitReached indicates that the read limit has been reached.
Functions ¶
func HTTPDecodingError ¶
func HTTPDecodingError(err error, tags []string, w http.ResponseWriter)
HTTPDecodingError is used for errors happening in decoding
func HTTPEndpointNotSupported ¶
func HTTPEndpointNotSupported(tags []string, w http.ResponseWriter)
HTTPEndpointNotSupported is for payloads getting sent to a wrong endpoint
func HTTPFormatError ¶
func HTTPFormatError(tags []string, w http.ResponseWriter)
HTTPFormatError is used for payload format errors
func HTTPRateByService ¶
func HTTPRateByService(w http.ResponseWriter, dynConf *sampler.DynamicConfig)
HTTPRateByService outputs, as a JSON, the recommended sampling rates for all services.
Types ¶
type HTTPReceiver ¶
type HTTPReceiver struct { Stats *info.ReceiverStats PreSampler *sampler.PreSampler Out chan pb.Trace // 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 pb.Trace, services chan pb.ServicesMetadata, ) *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) Listen ¶
func (r *HTTPReceiver) Listen(addr, logExtra string) error
Listen creates a new HTTP server listening on the provided address.
func (*HTTPReceiver) Run ¶
func (r *HTTPReceiver) Run()
Run 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.