datasource

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2022 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	QueryGetTrace                                 = "getTrace"
	QueryGetTraceSummaries                        = "getTraceSummaries"
	QueryGetTimeSeriesServiceStatistics           = "getTimeSeriesServiceStatistics"
	QueryGetAnalyticsRootCauseResponseTimeService = "getAnalyticsRootCauseResponseTimeService"
	QueryGetAnalyticsRootCauseResponseTimePath    = "getAnalyticsRootCauseResponseTimePath"
	QueryGetAnalyticsRootCauseErrorService        = "getAnalyticsRootCauseErrorService"
	QueryGetAnalyticsRootCauseErrorPath           = "getAnalyticsRootCauseErrorPath"
	QueryGetAnalyticsRootCauseErrorMessage        = "getAnalyticsRootCauseErrorMessage"
	QueryGetAnalyticsRootCauseFaultService        = "getAnalyticsRootCauseFaultService"
	QueryGetAnalyticsRootCauseFaultPath           = "getAnalyticsRootCauseFaultPath"
	QueryGetAnalyticsRootCauseFaultMessage        = "getAnalyticsRootCauseFaultMessage"
	QueryGetAnalyticsUrl                          = "getAnalyticsUrl"
	QueryGetAnalyticsUser                         = "getAnalyticsUser"
	QueryGetAnalyticsStatusCode                   = "getAnalyticsStatusCode"
	QueryGetInsights                              = "getInsights"
	QueryGetServiceMap                            = "getServiceMap"
)

Needs to match XrayQueryType in frontend code

Variables

This section is empty.

Functions

func GetServeOpts

func GetServeOpts() datasource.ServeOpts

GetServeOpts returns datasource.ServeOpts.

Types

type DataProcessor

type DataProcessor struct {
	// contains filtered or unexported fields
}

DataProcessor is responsible for counting and aggregating the trace data byt different columns. It is stateful mainly because before it just provided a callback to process one trace at the time. After sampling was added this processes the whole array of traces so could be refactored to stateless function.

func NewDataProcessor

func NewDataProcessor(queryType string) *DataProcessor

type Datasource

type Datasource struct {
	QueryMux    *datasource.QueryTypeMux
	ResourceMux backend.CallResourceHandler
	// contains filtered or unexported fields
}

func NewDatasource

func NewDatasource(
	xrayClientFactory XrayClientFactory,
	ec2ClientFactory Ec2ClientFactory,
) *Datasource

func (*Datasource) CheckHealth

type Ec2ClientFactory added in v1.1.0

type Ec2ClientFactory = func(pluginContext *backend.PluginContext) (*ec2.EC2, error)

Should probably return an interface similar to XrayClientFactory

type GetAnalyticsQueryData

type GetAnalyticsQueryData struct {
	Query  string      `json:"query"`
	Group  *xray.Group `json:"group"`
	Region string      `json:"region"`
}

type GetInsightsQueryData

type GetInsightsQueryData struct {
	State  string      `json:"state"`
	Group  *xray.Group `json:"group"`
	Region string      `json:"region"`
}

type GetServiceMapQueryData added in v1.3.0

type GetServiceMapQueryData struct {
	Region string      `json:"region"`
	Group  *xray.Group `json:"group"`
}

type GetTimeSeriesServiceStatisticsQueryData

type GetTimeSeriesServiceStatisticsQueryData struct {
	Query      string   `json:"query"`
	Columns    []string `json:"columns"`
	Resolution int64    `json:"resolution"`
	Region     string   `json:"region"`
}

type GetTraceQueryData

type GetTraceQueryData struct {
	Query  string `json:"query"`
	Region string `json:"region"`
}

type GetTraceSummariesQueryData

type GetTraceSummariesQueryData struct {
	Query  string `json:"query"`
	Region string `json:"region"`
}

type ValueDef

type ValueDef struct {
	// contains filtered or unexported fields
}

type XrayClient

type XrayClient interface {
	BatchGetTraces(input *xray.BatchGetTracesInput) (*xray.BatchGetTracesOutput, error)
	GetTraceSummariesWithContext(ctx aws.Context, input *xray.GetTraceSummariesInput, opts ...request.Option) (*xray.GetTraceSummariesOutput, error)
	GetTraceSummariesPages(input *xray.GetTraceSummariesInput, fn func(*xray.GetTraceSummariesOutput, bool) bool) error
	GetTimeSeriesServiceStatisticsPagesWithContext(
		aws.Context,
		*xray.GetTimeSeriesServiceStatisticsInput,
		func(*xray.GetTimeSeriesServiceStatisticsOutput, bool) bool,
		...request.Option,
	) error
	GetInsightSummaries(input *xray.GetInsightSummariesInput) (*xray.GetInsightSummariesOutput, error)
	GetGroupsPages(input *xray.GetGroupsInput, fn func(*xray.GetGroupsOutput, bool) bool) error
	GetServiceGraphPagesWithContext(ctx aws.Context, input *xray.GetServiceGraphInput, fn func(*xray.GetServiceGraphOutput, bool) bool, opts ...request.Option) error
	GetTraceGraphPages(input *xray.GetTraceGraphInput, fn func(*xray.GetTraceGraphOutput, bool) bool) error
}

type XrayClientFactory added in v1.1.0

type XrayClientFactory = func(pluginContext *backend.PluginContext) (XrayClient, error)

Jump to

Keyboard shortcuts

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