tracing

package
v1.76.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2023 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JAEGER = "jaeger"
	TEMPO  = "tempo"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	ClientInterface
	// contains filtered or unexported fields
}

Client for Tracing API.

func NewClient

func NewClient(token string) (*Client, error)

func (*Client) GetAppTraces

func (in *Client) GetAppTraces(namespace, app string, q models.TracingQuery) (*model.TracingResponse, error)

GetAppTraces fetches traces of an app

func (*Client) GetErrorTraces

func (in *Client) GetErrorTraces(ns, app string, duration time.Duration) (int, error)

GetErrorTraces fetches number of traces in error for the given app

func (*Client) GetServiceStatus

func (in *Client) GetServiceStatus() (bool, error)

func (*Client) GetTraceDetail

func (in *Client) GetTraceDetail(strTraceID string) (*model.TracingSingleTrace, error)

GetTraceDetail fetches a specific trace from its ID

type ClientInterface

type ClientInterface interface {
	GetAppTraces(ns, app string, query models.TracingQuery) (traces *model.TracingResponse, err error)
	GetTraceDetail(traceId string) (*model.TracingSingleTrace, error)
	GetErrorTraces(ns, app string, duration time.Duration) (errorTraces int, err error)
	GetServiceStatus() (available bool, err error)
}

ClientInterface for mocks (only mocked function are necessary here)

type HTTPClientInterface

type HTTPClientInterface interface {
	GetAppTracesHTTP(client http.Client, baseURL *url.URL, namespace, app string, q models.TracingQuery) (response *model.TracingResponse, err error)
	GetTraceDetailHTTP(client http.Client, endpoint *url.URL, traceID string) (*model.TracingSingleTrace, error)
	GetServiceStatusHTTP(client http.Client, baseURL *url.URL) (bool, error)
}

HTTPClientInterface for mocks (only mocked function are necessary here)

type SpansStreamer

type SpansStreamer interface {
	Recv() (*model.SpansResponseChunk, error)
	grpc.ClientStream
}

Directories

Path Synopsis
model
nolint
nolint
nolint
otel

Jump to

Keyboard shortcuts

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