Documentation ¶
Index ¶
Constants ¶
const ( OCOK = 0 OCCancelled = 1 OCUnknown = 2 OCInvalidArgument = 3 OCDeadlineExceeded = 4 OCNotFound = 5 OCAlreadyExists = 6 OCPermissionDenied = 7 OCResourceExhausted = 8 OCFailedPrecondition = 9 OCAborted = 10 OCOutOfRange = 11 OCUnimplemented = 12 OCInternal = 13 OCDataLoss = 15 OCUnauthenticated = 16 )
Variables ¶
This section is empty.
Functions ¶
func OCStatusCodeFromHTTP ¶ added in v0.4.0
OCStatusCodeFromHTTP takes an HTTP status code and return the appropriate OpenTelemetry status code See: https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/data-http.md
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client implements an HTTP sender for the SAPM protocol
func (*Client) Export ¶
Export takes a Jaeger batches and uses one of the available workers to export it synchronously. It returns an error in case a request cannot be processed. It's up to the caller to retry.
func (*Client) Stop ¶
func (sa *Client) Stop()
Stop waits for all inflight requests to finish and then drains the worker pool so no more work can be done. It returns once all workers are drained from the pool. Note that the client can accept new requests while Stop() waits for other requests to finish.
type ErrSend ¶ added in v0.3.0
ErrSend is returned by the HTTP sender when it fails to complete a request for any reason.
type Option ¶
Option takes a reference to a Client and sets relevant config fields on it.
func WithAccessToken ¶
WithAccessToken allows to pass an authentication token to the client. The auth token is set to X-SF-TOKEN HTTP header.
func WithEndpoint ¶
WithEndpoint takes an HTTP endpoint as a string in the format scheme://address:port/path and configures the client to export all requests to this endpoint.
func WithHTTPClient ¶
WithHTTPClient allows to pass a custom HTTP Client instance to SAPM Client
func WithMaxConnections ¶
WithMaxConnections allows to specify the max number of open HTTP connections the client should keep at any time.
func WithWorkers ¶
WithWorkers configures the client to use N number of workers.