Documentation ¶
Index ¶
- Constants
- func GetThresholdTypeNameForColor(color string) string
- type CustomChartingTileProcessing
- type DashboardError
- type DashboardLink
- type DataExplorerTileProcessing
- type ManagementZoneFilter
- type MarkdownTileProcessing
- type MetricsQueryProcessing
- type ProblemTileProcessing
- type Processing
- type ProcessingError
- type Retrieval
- type RetrievalError
- type SLOTileProcessing
- type USQLTileProcessing
- type UploadSLOsError
Constants ¶
const ( TotalPass = "kqg.total.pass" TotalWarning = "kqg.total.warning" CompareWithScore = "kqg.compare.withscore" CompareWithScoreAll = "all" CompareWithScorePass = "pass" CompareWithScorePassOrWarn = "pass_or_warn" CompareResults = "kqg.compare.results" CompareResultsSingle = "single_result" CompareResultsMultiple = "several_results" CompareFunction = "kqg.compare.function" CompareFunctionAvg = "avg" CompareFunctionP50 = "p50" CompareFunctionP90 = "p90" CompareFunctionP95 = "p95" )
Variables ¶
This section is empty.
Functions ¶
func GetThresholdTypeNameForColor ¶
GetThresholdTypeNameForColor returns a string with the threshold type name for the specified color. Convienence function for use in tests.
Types ¶
type CustomChartingTileProcessing ¶
type CustomChartingTileProcessing struct {
// contains filtered or unexported fields
}
CustomChartingTileProcessing represents the processing of a Custom Charting dashboard tile.
func NewCustomChartingTileProcessing ¶
func NewCustomChartingTileProcessing(client dynatrace.ClientInterface, eventData adapter.EventContentAdapter, customFilters []*keptnv2.SLIFilter, timeframe common.Timeframe, flags ff.GetSLIFeatureFlags) *CustomChartingTileProcessing
NewCustomChartingTileProcessing creates a new CustomChartingTileProcessing.
func (*CustomChartingTileProcessing) Process ¶
func (p *CustomChartingTileProcessing) Process(ctx context.Context, tile *dynatrace.Tile, dashboardFilter *dynatrace.DashboardFilter) []result.SLIWithSLO
Process processes the specified Custom Charting dashboard tile.
type DashboardError ¶
type DashboardError struct {
// contains filtered or unexported fields
}
DashboardError represents a base error that happened while getting SLIs and SLOs from a dashboard.
func NewDashboardError ¶
func NewDashboardError(cause error) *DashboardError
NewDashboardError will create a new DashboardError.
func (*DashboardError) Error ¶
func (e *DashboardError) Error() string
func (*DashboardError) Unwrap ¶
func (e *DashboardError) Unwrap() error
type DashboardLink ¶
type DashboardLink struct {
// contains filtered or unexported fields
}
func NewLink ¶
func NewLink( apiURL string, timeframe common.Timeframe, dashboardID string, dashboardFilter *dynatrace.DashboardFilter) *DashboardLink
func (*DashboardLink) String ¶
func (dashboardLink *DashboardLink) String() string
type DataExplorerTileProcessing ¶
type DataExplorerTileProcessing struct {
// contains filtered or unexported fields
}
DataExplorerTileProcessing represents the processing of a Data Explorer dashboard tile.
func NewDataExplorerTileProcessing ¶
func NewDataExplorerTileProcessing(client dynatrace.ClientInterface, eventData adapter.EventContentAdapter, customFilters []*keptnv2.SLIFilter, timeframe common.Timeframe, flags ff.GetSLIFeatureFlags) *DataExplorerTileProcessing
NewDataExplorerTileProcessing creates a new DataExplorerTileProcessing.
func (*DataExplorerTileProcessing) Process ¶
func (p *DataExplorerTileProcessing) Process(ctx context.Context, tile *dynatrace.Tile, dashboardFilter *dynatrace.DashboardFilter) []result.SLIWithSLO
Process processes the specified Data Explorer dashboard tile.
type ManagementZoneFilter ¶
type ManagementZoneFilter struct {
// contains filtered or unexported fields
}
func NewManagementZoneFilter ¶
func NewManagementZoneFilter( dashboardManagementZone *dynatrace.DashboardFilter, tileManagementZone *dynatrace.ManagementZoneEntry, ) *ManagementZoneFilter
func (*ManagementZoneFilter) ForMZSelector ¶
func (filter *ManagementZoneFilter) ForMZSelector() string
ForMZSelector returns the ID of the ManagementZone in a valid representation for the mzSelector. If a ManagementZone for a Dashboard tile is given, then it will take precedence over the ManagementZone of the DashboardFilter If none of both are given it will return an empty string
func (*ManagementZoneFilter) ForProblemSelector ¶
func (filter *ManagementZoneFilter) ForProblemSelector() string
ForProblemSelector returns the ID of the ManagementZone in a valid representation for the problemSelector. If a ManagementZone for a Dashboard tile is given, then it will take precedence over the ManagementZone of the DashboardFilter If none of both are given it will return an empty string
type MarkdownTileProcessing ¶
type MarkdownTileProcessing struct { }
func NewMarkdownTileProcessing ¶
func NewMarkdownTileProcessing() *MarkdownTileProcessing
NewMarkdownTileProcessing will create a new MarkdownTileProcessing
func (*MarkdownTileProcessing) TryProcess ¶
func (p *MarkdownTileProcessing) TryProcess(tile *dynatrace.Tile) (*markdownParsingResult, error)
TryProcess tries to process the specified markdown tile as a KQG total score and comparison configuration. If it is not such a tile, i.e. does not contain "KQG.", it returns nil with nil error. Otherwise it returns the parsing result or an error, overwriting the default values for SLOScore and SLOComparison with the contents found in the markdown
type MetricsQueryProcessing ¶
type MetricsQueryProcessing struct {
// contains filtered or unexported fields
}
func NewMetricsQueryProcessing ¶
func NewMetricsQueryProcessing(client dynatrace.ClientInterface, targetUnitID string, flags ff.GetSLIFeatureFlags) *MetricsQueryProcessing
func NewMetricsQueryProcessingThatAllowsOnlyOneResult ¶
func NewMetricsQueryProcessingThatAllowsOnlyOneResult(client dynatrace.ClientInterface, targetUnitID string, flags ff.GetSLIFeatureFlags) *MetricsQueryProcessing
func (*MetricsQueryProcessing) Process ¶
func (r *MetricsQueryProcessing) Process(ctx context.Context, sloDefinition result.SLO, metricsQuery metrics.Query, timeframe common.Timeframe) []result.SLIWithSLO
Process generates SLI & SLO definitions based on the metric query and the number of dimensions in the chart definition.
type ProblemTileProcessing ¶
type ProblemTileProcessing struct {
// contains filtered or unexported fields
}
ProblemTileProcessing represents the processing of a problems dashboard tile.
func NewProblemTileProcessing ¶
func NewProblemTileProcessing(client dynatrace.ClientInterface, timeframe common.Timeframe) *ProblemTileProcessing
NewProblemTileProcessing creates a new ProblemTileProcessing.
func (*ProblemTileProcessing) Process ¶
func (p *ProblemTileProcessing) Process(ctx context.Context, tile *dynatrace.Tile, dashboardFilter *dynatrace.DashboardFilter) []result.SLIWithSLO
Process retrieves the open problem count and returns this as a TileResult. An SLO definition with a pass criteria of <= 0 is also included as we don't allow problems.
type Processing ¶
type Processing struct {
// contains filtered or unexported fields
}
Processing will process a Dynatrace dashboard
func NewProcessing ¶
func NewProcessing(client dynatrace.ClientInterface, eventData adapter.EventContentAdapter, customFilters []*keptnv2.SLIFilter, timeframe common.Timeframe, sloUploader sloUploaderInterface, flags ff.GetSLIFeatureFlags) *Processing
NewProcessing will create a new Processing
func (*Processing) Process ¶
func (p *Processing) Process(ctx context.Context, dashboard *dynatrace.Dashboard) ([]result.SLIWithSLO, error)
Process processes a dynatrace.Dashboard.
type ProcessingError ¶
type ProcessingError struct {
// contains filtered or unexported fields
}
ProcessingError represents an error that happened while processing a dashboard.
func NewProcessingError ¶
func NewProcessingError(cause error) *ProcessingError
NewProcessingError will create a new ProcessingError.
func (*ProcessingError) Error ¶
func (e *ProcessingError) Error() string
func (*ProcessingError) Unwrap ¶
func (e *ProcessingError) Unwrap() error
type Retrieval ¶
type Retrieval struct {
// contains filtered or unexported fields
}
func NewRetrieval ¶
func NewRetrieval(client dynatrace.ClientInterface, eventData adapter.EventContentAdapter) *Retrieval
func (*Retrieval) Retrieve ¶
func (r *Retrieval) Retrieve(ctx context.Context, dashboardProperty string) (*dynatrace.Dashboard, error)
Retrieve Depending on the dashboard parameter which is pulled from dynatrace.conf.yaml:dashboard this method either
- query: queries all dashboards on the Dynatrace Tenant and returns the one that matches project/service/stage, or
- dashboard-ID: if this is a valid dashboard ID it will query the dashboard with this ID, e.g: ddb6a571-4bda-4e8b-a9c0-4a3e02c2e14a, or
It returns a parsed Dynatrace Dashboard and the actual dashboard ID in case we queried a dashboard.
type RetrievalError ¶
type RetrievalError struct {
// contains filtered or unexported fields
}
RetrievalError represents an error that happened while retrieving a dashboard.
func NewRetrievalError ¶
func NewRetrievalError(cause error) *RetrievalError
NewRetrievalError will create a new RetrievalError.
func (*RetrievalError) Error ¶
func (e *RetrievalError) Error() string
func (*RetrievalError) Unwrap ¶
func (e *RetrievalError) Unwrap() error
type SLOTileProcessing ¶
type SLOTileProcessing struct {
// contains filtered or unexported fields
}
SLOTileProcessing represents the processing of a SLO dashboard tile.
func NewSLOTileProcessing ¶
func NewSLOTileProcessing(client dynatrace.ClientInterface, timeframe common.Timeframe, flags ff.GetSLIFeatureFlags) *SLOTileProcessing
NewSLOTileProcessing creates a new SLOTileProcessing.
func (*SLOTileProcessing) Process ¶
func (p *SLOTileProcessing) Process(ctx context.Context, tile *dynatrace.Tile) []result.SLIWithSLO
Process processes the specified SLO dashboard tile.
type USQLTileProcessing ¶
type USQLTileProcessing struct {
// contains filtered or unexported fields
}
USQLTileProcessing represents the processing of a USQL dashboard tile.
func NewUSQLTileProcessing ¶
func NewUSQLTileProcessing(client dynatrace.ClientInterface, eventData adapter.EventContentAdapter, customFilters []*keptnv2.SLIFilter, timeframe common.Timeframe, flags ff.GetSLIFeatureFlags) *USQLTileProcessing
NewUSQLTileProcessing creates a new USQLTileProcessing.
func (*USQLTileProcessing) Process ¶
func (p *USQLTileProcessing) Process(ctx context.Context, tile *dynatrace.Tile) []result.SLIWithSLO
Process processes the specified USQL dashboard tile. TODO: 2022-03-07: Investigate if all error and warning cases are covered. E.g. what happens if a query returns no results?
type UploadSLOsError ¶
type UploadSLOsError struct {
// contains filtered or unexported fields
}
UploadSLOsError respresents an error that happened while uploading the SLO file.
func NewUploadSLOsError ¶
func NewUploadSLOsError(cause error) *UploadSLOsError
NewUploadSLOsError will create a new UploadSLOsError.
func (*UploadSLOsError) Error ¶
func (e *UploadSLOsError) Error() string
func (*UploadSLOsError) Unwrap ¶
func (e *UploadSLOsError) Unwrap() error
Source Files ¶
- custom_charting_tile_processing.go
- dashboard_error.go
- dashboard_processing.go
- dashboard_retrieval.go
- dashboardlink.go
- data_explorer_thresholds.go
- data_explorer_tile_processing.go
- key_value_parsing.go
- management_zone_filter.go
- markdown_tile_processing.go
- metrics_query_processing.go
- problem_tile_processing.go
- slo_definition_parsing.go
- slo_tile_processing.go
- usql_tile_processing.go