query

package
v0.0.0-...-3da42c7 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsMatchingMetricID

func IsMatchingMetricID(singleResultMetricID string, queryMetricID string) bool

IsMatchingMetricID checks whether a query is matching When passing a query to dynatrace using filter expressions - the dimension names in a filter will be escaped with special characters, e.g: filter(dt.entity.browser,IE) becomes filter(dt~entity~browser,ie). This function here tries to come up with a better matching algorithm WHILE NOT PERFECT - HERE IS THE FIRST IMPLEMENTATION

Types

type CustomQueries

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

CustomQueries provides access to user-defined or default SLIs.

func NewCustomQueries

func NewCustomQueries(values map[string]string) *CustomQueries

NewCustomQueries creates a new CustomQueries which will offer the specified SLIs as well as defaults.

func NewEmptyCustomQueries

func NewEmptyCustomQueries() *CustomQueries

NewEmptyCustomQueries creates a new CustomQueries which will only offer default SLIs.

func (*CustomQueries) GetQueryByNameOrDefault

func (cq *CustomQueries) GetQueryByNameOrDefault(sliName string) (string, error)

GetQueryByNameOrDefault returns the custom query with the specified name, a default if available or an error if no such default exists.

func (*CustomQueries) GetQueryByNameOrDefaultIfEmpty

func (cq *CustomQueries) GetQueryByNameOrDefaultIfEmpty(sliName string) (string, error)

GetQueryByNameOrDefaultIfEmpty returns the custom query with the specified name. If custom queries have been defined, an error will be returned if an entry for name is not included, or if no custom queries have been defined, a default will be returned if available, or an error if no such default exists.

type Processing

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

Processing representing the processing of custom SLI queries.

func NewProcessing

func NewProcessing(client dynatrace.ClientInterface, eventData adapter.EventContentAdapter, customFilters []*keptnv2.SLIFilter, customQueries *CustomQueries, timeframe common.Timeframe, sloGetter sloGetterInterface) *Processing

NewProcessing creates a new Processing.

func (*Processing) Process

func (p *Processing) Process(ctx context.Context, indicators []string) ([]result.SLIWithSLO, error)

Process queries the specified indicators and results a slice of SLIWithSLOs.

Jump to

Keyboard shortcuts

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