Documentation
¶
Index ¶
- Variables
- type AttributeKey
- type Column
- type Common
- type DescribeSchemaInput
- type FindSpansInput
- type GetTraceInput
- type ListServicesInput
- type Rows
- type Runner
- func (r *Runner) DescribeSchema(ctx context.Context, in DescribeSchemaInput) (SchemaOutput, error)
- func (r *Runner) FindSpans(ctx context.Context, in FindSpansInput) (Rows, error)
- func (r *Runner) GetTrace(ctx context.Context, in GetTraceInput) (TraceOutput, error)
- func (r *Runner) ListServices(ctx context.Context, in ListServicesInput) (Rows, error)
- func (r *Runner) SQL(ctx context.Context, in SQLInput) (Rows, error)
- func (r *Runner) SearchLogs(ctx context.Context, in SearchLogsInput) (Rows, error)
- type SQLInput
- type SchemaOutput
- type SearchLogsInput
- type SignalSchema
- type TraceOutput
- type Window
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInput = errors.New("invalid input")
ErrInput marks validation failures that the caller can fix by changing its input.
Functions ¶
This section is empty.
Types ¶
type AttributeKey ¶
type DescribeSchemaInput ¶
type FindSpansInput ¶
type FindSpansInput struct {
Common
Limit int `json:"limit,omitempty" jsonschema:"Maximum rows to return. Defaults to 100, capped at 500."`
Name string `json:"name,omitempty" jsonschema:"Case-insensitive substring of the span name."`
Kind string `json:"kind,omitempty" jsonschema:"Span kind: internal, server, client, producer, consumer or unspecified."`
Status string `json:"status,omitempty" jsonschema:"Span status: unset, ok or error."`
HTTPRoute string `json:"http_route,omitempty" jsonschema:"Exact http.route value."`
MinDurationMS int64 `json:"min_duration_ms,omitempty" jsonschema:"Only spans at least this many milliseconds long."`
Attrs map[string]string `json:"attrs,omitempty" jsonschema:"Attribute key to exact value pairs that must all match."`
}
type GetTraceInput ¶
type GetTraceInput struct {
TraceID string `json:"trace_id" jsonschema:"Trace ID as 32 hex characters."`
Service string `json:"service,omitempty" jsonschema:"Only include this service name."`
MaxSpans int `json:"max_spans,omitempty" jsonschema:"Maximum spans to return, ordered by start time. Defaults to 1000, capped at 1000."`
// A pointer so an omitted field defaults to true.
IncludeLogs *bool `json:"include_logs,omitempty" jsonschema:"Also return logs correlated by trace_id. Defaults to true."`
}
type ListServicesInput ¶
type ListServicesInput struct {
Window
}
type Runner ¶
type Runner struct {
Eng *engine.Engine
Now func() time.Time
// Service is non-empty when Eng is scoped to that service.
Service string
}
func (*Runner) DescribeSchema ¶
func (r *Runner) DescribeSchema(ctx context.Context, in DescribeSchemaInput) (SchemaOutput, error)
func (*Runner) GetTrace ¶
func (r *Runner) GetTrace(ctx context.Context, in GetTraceInput) (TraceOutput, error)
func (*Runner) ListServices ¶
func (*Runner) SearchLogs ¶
type SchemaOutput ¶
type SchemaOutput struct {
Logs SignalSchema `json:"logs"`
Spans SignalSchema `json:"spans"`
Truncated bool `json:"truncated"`
Note string `json:"note"`
}
type SearchLogsInput ¶
type SearchLogsInput struct {
Common
Limit int `json:"limit,omitempty" jsonschema:"Maximum rows to return. Defaults to 20, capped at 500."`
MinSeverity string `json:"min_severity,omitempty" jsonschema:"Minimum severity: a number 1-24 or one of trace, debug, info, warn, error, fatal."`
Text string `json:"text,omitempty" jsonschema:"Case-insensitive substring of the log body."`
Regex string `json:"regex,omitempty" jsonschema:"RE2 regular expression matched against the log body."`
EventName string `json:"event_name,omitempty" jsonschema:"Exact event name."`
TraceID string `json:"trace_id,omitempty" jsonschema:"Trace ID as 32 hex characters."`
SessionID string `json:"session_id,omitempty" jsonschema:"Exact session ID."`
Attrs map[string]string `json:"attrs,omitempty" jsonschema:"Attribute key to exact value pairs that must all match."`
}
type SignalSchema ¶
type SignalSchema struct {
Columns []Column `json:"columns"`
TopAttributeKeys []AttributeKey `json:"top_attribute_keys"`
}
type TraceOutput ¶
Click to show internal directories.
Click to hide internal directories.