Documentation ¶
Index ¶
- type Alert
- type CallOption
- func WithActiveAt(t time.Time) CallOption
- func WithEnd(t time.Time) CallOption
- func WithLabels(labels []string) CallOption
- func WithLimit(i int32) CallOption
- func WithOperation(s string) CallOption
- func WithStart(t time.Time) CallOption
- func WithStates(states []string) CallOption
- func WithTags(tags []string) CallOption
- type Log
- type Ops
- func (o *Ops) Alerts(ctx context.Context, options ...CallOption) ([]Alert, error)
- func (o *Ops) ChangeSampling(ctx context.Context, sampler *pb.ChangeSamplingReq) error
- func (o *Ops) DeployedVersion(ctx context.Context) (string, error)
- func (o *Ops) ListTraces(ctx context.Context, options ...CallOption) ([]TraceItem, error)
- func (o *Ops) ShowLogs(ctx context.Context, id string) ([]Log, error)
- func (o *Ops) ShowTrace(ctx context.Context, id string) (*pb.ShowTraceResp, error)
- type TraceData
- type TraceItem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Alert ¶
type Alert struct { // State is the state of the alert. State string // Value is the value of the alert. Value string // ActiveAt was when the alert started. ActiveAt time.Time }
Alert represents a Prometheus alert.
type CallOption ¶
type CallOption func(o *callOptions) error
CallOption is an option for method.
func WithActiveAt ¶
func WithActiveAt(t time.Time) CallOption
WithActiveAt restrics alerts to ones from this time to now.
func WithEnd ¶
func WithEnd(t time.Time) CallOption
Withend sets the maximum time a trace had to start in order to be included.
func WithLabels ¶
func WithLabels(labels []string) CallOption
WithLabels restricts alerts to ones that have all these labels.
func WithLimit ¶
func WithLimit(i int32) CallOption
WithLimt sets the maximum amount of return values. When using Cassandra, this is not a limit, it is some weird value where increasing it can increase how deep cassandra searches for traces. In that case, setting 20 might return 10 results but setting 100 might return 20.
func WithOperation ¶
func WithOperation(s string) CallOption
WithOperation restricts traces to ones that have this operation.
func WithStart ¶
func WithStart(t time.Time) CallOption
WithStart sets the minimum time a trace had to start in order to be included.
func WithStates ¶
func WithStates(states []string) CallOption
WithStates restrics alerts to ones that have one of these states.
func WithTags ¶
func WithTags(tags []string) CallOption
WithTags restricts resuts to ones that have all these tags.
type Ops ¶
type Ops struct {
// contains filtered or unexported fields
}
Ops is a client for interacting with the Ops service.
func (*Ops) ChangeSampling ¶
ChangeSampling is used to change the sampling rate of the service.
func (*Ops) DeployedVersion ¶
DeployedVersion will return the deployed version of the application according to Prometheus.
func (*Ops) ListTraces ¶
ListTraces lists traces for the Petstore. By default it pulls the latest 10 items.