Documentation ¶
Index ¶
- func BuildTracingServiceName(namespace, app string) string
- type Client
- func (in *Client) GetAppTraces(namespace, app string, q models.TracingQuery) (*model.TracingResponse, error)
- func (in *Client) GetErrorTraces(ns, app string, duration time.Duration) (int, error)
- func (in *Client) GetServiceStatus() (bool, error)
- func (in *Client) GetTraceDetail(strTraceID string) (*model.TracingSingleTrace, error)
- type ClientInterface
- type GRPCClientInterface
- type HTTPClientInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildTracingServiceName ¶ added in v1.77.0
Types ¶
type Client ¶
type Client struct { ClientInterface // contains filtered or unexported fields }
Client for Tracing API.
func NewClient ¶
NewClient creates a tracing Client. If it fails to create the client for any reason, it will retry indefinitely until the context is cancelled.
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 ¶
GetErrorTraces fetches number of traces in error for the given app
func (*Client) GetServiceStatus ¶
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 GRPCClientInterface ¶ added in v1.77.0
type GRPCClientInterface interface { FindTraces(context context.Context, app string, q models.TracingQuery) (response *model.TracingResponse, err error) GetTrace(context context.Context, traceID string) (*model.TracingSingleTrace, error) GetServices(context context.Context) (bool, error) }
GRPCClientInterface for Mocks, also for Tempo or Jaeger
type HTTPClientInterface ¶
type HTTPClientInterface interface { GetAppTracesHTTP(client http.Client, baseURL *url.URL, serviceName 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, also for Tempo or Jaeger
Click to show internal directories.
Click to hide internal directories.