custommetrics

package
v1.52.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Operators = struct {
	Equals               Operator
	GreaterThan          Operator
	GreaterThanOrEqualTo Operator
	In                   Operator
	IsNotNull            Operator
	IsNull               Operator
	LessThan             Operator
	LessThanOrEqualTo    Operator
	Like                 Operator
	NotEqual             Operator
	NotLike              Operator
	StartsWith           Operator
}{
	"EQUALS",
	"GREATER_THAN",
	"GREATER_THAN_OR_EQUAL_TO",
	"IN",
	"IS_NOT_NULL",
	"IS_NULL",
	"LESS_THAN",
	"LESS_THAN_OR_EQUAL_TO",
	"LIKE",
	"NOT_EQUAL",
	"NOT_LIKE",
	"STARTS_WITH",
}
View Source
var ValueTypes = struct {
	Counter ValueType
	Field   ValueType
}{
	"COUNTER",
	"FIELD",
}

Functions

This section is empty.

Types

type Filter

type Filter struct {
	FieldName string   `json:"fieldName"` // Field name
	Operator  Operator `json:"operator"`  // Possible Values: `EQUALS`, `GREATER_THAN`, `GREATER_THAN_OR_EQUAL_TO`, `IN`, `IS_NOT_NULL`, `IS_NULL`, `LESS_THAN`, `LESS_THAN_OR_EQUAL_TO`, `LIKE`, `NOT_EQUAL`, `NOT_LIKE`, `STARTS_WITH`
	Value     *string  `json:"value,omitempty"`
	ValueIn   []string `json:"valueIn,omitempty"` // Values
}

func (*Filter) HandlePreconditions

func (me *Filter) HandlePreconditions() error

func (*Filter) MarshalHCL

func (me *Filter) MarshalHCL(properties hcl.Properties) error

func (*Filter) Schema

func (me *Filter) Schema() map[string]*schema.Schema

func (*Filter) UnmarshalHCL

func (me *Filter) UnmarshalHCL(decoder hcl.Decoder) error

type Filters

type Filters []*Filter

func (Filters) MarshalHCL

func (me Filters) MarshalHCL(properties hcl.Properties) error

func (*Filters) Schema

func (me *Filters) Schema() map[string]*schema.Schema

func (*Filters) UnmarshalHCL

func (me *Filters) UnmarshalHCL(decoder hcl.Decoder) error

type MetricValue

type MetricValue struct {
	FieldName *string   `json:"fieldName,omitempty"` // Field name
	Type      ValueType `json:"type"`                // Possible Values: `COUNTER`, `FIELD`
}

func (*MetricValue) HandlePreconditions

func (me *MetricValue) HandlePreconditions() error

func (*MetricValue) MarshalHCL

func (me *MetricValue) MarshalHCL(properties hcl.Properties) error

func (*MetricValue) Schema

func (me *MetricValue) Schema() map[string]*schema.Schema

func (*MetricValue) UnmarshalHCL

func (me *MetricValue) UnmarshalHCL(decoder hcl.Decoder) error

type Operator

type Operator string

type Settings

type Settings struct {
	Dimensions []string     `json:"dimensions,omitempty"` // Defines the fields that are used as dimensions. A dimension is a collection of reference information about a metric data point that is of interest to your business. Dimensions are parameters like \"browserFamily\", \"userType\", \"country\". For example, using \"userType\" as a dimension allows you to split chart data based on user types.
	Enabled    bool         `json:"enabled"`              // This setting is enabled (`true`) or disabled (`false`)
	Filters    Filters      `json:"filters,omitempty"`    // Defines the filters for the user session. Filters apply at the moment of extracting the data and only sessions that satisfy the filtering criteria will be used to extract the custom metrics. You will not be able to modify these filters in the metric data explorer. For example, using \"userType equals REAL_USER\" will give you only data from real users, while forcing the synthetic sessions to be ignored.
	MetricKey  string       `json:"metricKey"`            // Metric key
	Value      *MetricValue `json:"value"`                // Defines the type of value to be extracted from the user session. When using **User session counter**, the number of user sessions is counted (similar to count(*) when using USQL). When using **User session field value**, the value of a user session field is extracted.
}

func (*Settings) MarshalHCL

func (me *Settings) MarshalHCL(properties hcl.Properties) error

func (*Settings) Name

func (me *Settings) Name() string

func (*Settings) Schema

func (me *Settings) Schema() map[string]*schema.Schema

func (*Settings) UnmarshalHCL

func (me *Settings) UnmarshalHCL(decoder hcl.Decoder) error

type ValueType

type ValueType string

Jump to

Keyboard shortcuts

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