Documentation ¶
Index ¶
- Constants
- func ContainsOutOfMemoryLog(logString string) bool
- func GenerateCPUUtilizationEnhancedMetrics(args GenerateCPUUtilizationEnhancedMetricArgs)
- func GenerateEnhancedMetricsFromReportLog(args GenerateEnhancedMetricsFromReportLogArgs)
- func GenerateEnhancedMetricsFromRuntimeDoneLog(args GenerateEnhancedMetricsFromRuntimeDoneLogArgs)
- func GenerateOutOfMemoryEnhancedMetrics(time time.Time, tags []string, demux aggregator.Demultiplexer)
- func SendASMInvocationEnhancedMetric(tags []string, demux aggregator.Demultiplexer)
- func SendCPUEnhancedMetrics(cpuOffsetData *proc.CPUData, uptimeOffset float64, tags []string, ...)
- func SendErrorsEnhancedMetric(tags []string, t time.Time, demux aggregator.Demultiplexer)
- func SendFailoverReasonMetric(tags []string, demux aggregator.Demultiplexer)
- func SendInvocationEnhancedMetric(tags []string, demux aggregator.Demultiplexer)
- func SendNetworkEnhancedMetrics(networkOffsetData *proc.NetworkData, tags []string, ...)
- func SendOutOfMemoryEnhancedMetric(tags []string, t time.Time, demux aggregator.Demultiplexer)
- func SendProcessEnhancedMetrics(sendMetrics chan bool, tags []string, metricAgent *ServerlessMetricAgent)
- func SendTimeoutEnhancedMetric(tags []string, demux aggregator.Demultiplexer)
- func SendTmpEnhancedMetrics(sendMetrics chan bool, tags []string, metricAgent *ServerlessMetricAgent)
- type DogStatsDFactory
- type GenerateCPUUtilizationEnhancedMetricArgs
- type GenerateEnhancedMetricsFromReportLogArgs
- type GenerateEnhancedMetricsFromRuntimeDoneLogArgs
- type MetricConfig
- type MetricDogStatsD
- type MultipleEndpointConfig
- type ServerlessMetricAgent
- func (c *ServerlessMetricAgent) Flush()
- func (c *ServerlessMetricAgent) GetExtraTags() []string
- func (c *ServerlessMetricAgent) IsReady() bool
- func (c *ServerlessMetricAgent) SetExtraTags(tagArray []string)
- func (c *ServerlessMetricAgent) Start(forwarderTimeout time.Duration, multipleEndpointConfig MultipleEndpointConfig, ...)
- func (c *ServerlessMetricAgent) Stop()
Constants ¶
const ( // OutOfMemoryMetric is the name of the out of memory enhanced Lambda metric OutOfMemoryMetric = "aws.lambda.enhanced.out_of_memory" // ErrorsMetric is the name of the errors enhanced Lambda metric ErrorsMetric = "aws.lambda.enhanced.errors" )
Variables ¶
This section is empty.
Functions ¶
func ContainsOutOfMemoryLog ¶
ContainsOutOfMemoryLog determines whether a runtime specific out of memory string is found in the log line
func GenerateCPUUtilizationEnhancedMetrics ¶
func GenerateCPUUtilizationEnhancedMetrics(args GenerateCPUUtilizationEnhancedMetricArgs)
func GenerateEnhancedMetricsFromReportLog ¶
func GenerateEnhancedMetricsFromReportLog(args GenerateEnhancedMetricsFromReportLogArgs)
GenerateEnhancedMetricsFromReportLog generates enhanced metrics from a LogTypePlatformReport log message
func GenerateEnhancedMetricsFromRuntimeDoneLog ¶
func GenerateEnhancedMetricsFromRuntimeDoneLog(args GenerateEnhancedMetricsFromRuntimeDoneLogArgs)
GenerateEnhancedMetricsFromRuntimeDoneLog generates the runtime duration metric
func GenerateOutOfMemoryEnhancedMetrics ¶
func GenerateOutOfMemoryEnhancedMetrics(time time.Time, tags []string, demux aggregator.Demultiplexer)
GenerateOutOfMemoryEnhancedMetrics generates enhanced metrics specific to an out of memory error
func SendASMInvocationEnhancedMetric ¶
func SendASMInvocationEnhancedMetric(tags []string, demux aggregator.Demultiplexer)
SendASMInvocationEnhancedMetric sends an enhanced metric representing an appsec supported invocation at the current time Metric is sent even if enhanced metrics are disabled
func SendCPUEnhancedMetrics ¶
func SendCPUEnhancedMetrics(cpuOffsetData *proc.CPUData, uptimeOffset float64, tags []string, demux aggregator.Demultiplexer)
SendCPUEnhancedMetrics sends CPU enhanced metrics for the invocation
func SendErrorsEnhancedMetric ¶
func SendErrorsEnhancedMetric(tags []string, t time.Time, demux aggregator.Demultiplexer)
SendErrorsEnhancedMetric sends an enhanced metric representing an error at a given time
func SendFailoverReasonMetric ¶
func SendFailoverReasonMetric(tags []string, demux aggregator.Demultiplexer)
func SendInvocationEnhancedMetric ¶
func SendInvocationEnhancedMetric(tags []string, demux aggregator.Demultiplexer)
SendInvocationEnhancedMetric sends an enhanced metric representing an invocation at the current time
func SendNetworkEnhancedMetrics ¶
func SendNetworkEnhancedMetrics(networkOffsetData *proc.NetworkData, tags []string, demux aggregator.Demultiplexer)
func SendOutOfMemoryEnhancedMetric ¶
func SendOutOfMemoryEnhancedMetric(tags []string, t time.Time, demux aggregator.Demultiplexer)
SendOutOfMemoryEnhancedMetric sends an enhanced metric representing a function running out of memory at a given time
func SendProcessEnhancedMetrics ¶
func SendProcessEnhancedMetrics(sendMetrics chan bool, tags []string, metricAgent *ServerlessMetricAgent)
func SendTimeoutEnhancedMetric ¶
func SendTimeoutEnhancedMetric(tags []string, demux aggregator.Demultiplexer)
SendTimeoutEnhancedMetric sends an enhanced metric representing a timeout at the current time
func SendTmpEnhancedMetrics ¶
func SendTmpEnhancedMetrics(sendMetrics chan bool, tags []string, metricAgent *ServerlessMetricAgent)
Types ¶
type DogStatsDFactory ¶
type DogStatsDFactory interface {
NewServer(aggregator.Demultiplexer) (dogstatsdServer.ServerlessDogstatsd, error)
}
DogStatsDFactory allows create a new DogStatsD server
type GenerateEnhancedMetricsFromReportLogArgs ¶
type GenerateEnhancedMetricsFromReportLogArgs struct { InitDurationMs float64 DurationMs float64 BilledDurationMs int MemorySizeMb int MaxMemoryUsedMb int RuntimeStart time.Time RuntimeEnd time.Time T time.Time Tags []string Demux aggregator.Demultiplexer }
GenerateEnhancedMetricsFromReportLogArgs provides the arguments required for the GenerateEnhancedMetricsFromReportLog func
type GenerateEnhancedMetricsFromRuntimeDoneLogArgs ¶
type GenerateEnhancedMetricsFromRuntimeDoneLogArgs struct { Start time.Time End time.Time ResponseLatency float64 ResponseDuration float64 ProducedBytes float64 Tags []string Demux aggregator.Demultiplexer }
GenerateEnhancedMetricsFromRuntimeDoneLogArgs are the arguments required for the GenerateEnhancedMetricsFromRuntimeDoneLog func
type MetricConfig ¶
type MetricConfig struct { }
MetricConfig abstacts the config package
func (*MetricConfig) GetMultipleEndpoints ¶
func (m *MetricConfig) GetMultipleEndpoints() (map[string][]string, error)
GetMultipleEndpoints returns the api keys per domain specified in the main agent config
type MetricDogStatsD ¶
type MetricDogStatsD struct { }
MetricDogStatsD abstracts the DogStatsD package
func (*MetricDogStatsD) NewServer ¶
func (m *MetricDogStatsD) NewServer(demux aggregator.Demultiplexer) (dogstatsdServer.ServerlessDogstatsd, error)
NewServer returns a running DogStatsD server
type MultipleEndpointConfig ¶
MultipleEndpointConfig abstracts the config package
type ServerlessMetricAgent ¶
type ServerlessMetricAgent struct { Tagger tagger.Component Demux aggregator.Demultiplexer SketchesBucketOffset time.Duration // contains filtered or unexported fields }
ServerlessMetricAgent represents the DogStatsD server and the aggregator
func (*ServerlessMetricAgent) Flush ¶
func (c *ServerlessMetricAgent) Flush()
Flush triggers a DogStatsD flush
func (*ServerlessMetricAgent) GetExtraTags ¶
func (c *ServerlessMetricAgent) GetExtraTags() []string
GetExtraTags gets extra tags
func (*ServerlessMetricAgent) IsReady ¶
func (c *ServerlessMetricAgent) IsReady() bool
IsReady indicates whether or not the DogStatsD server is ready
func (*ServerlessMetricAgent) SetExtraTags ¶
func (c *ServerlessMetricAgent) SetExtraTags(tagArray []string)
SetExtraTags sets extra tags on the DogStatsD server
func (*ServerlessMetricAgent) Start ¶
func (c *ServerlessMetricAgent) Start(forwarderTimeout time.Duration, multipleEndpointConfig MultipleEndpointConfig, dogstatFactory DogStatsDFactory)
Start starts the DogStatsD agent
func (*ServerlessMetricAgent) Stop ¶
func (c *ServerlessMetricAgent) Stop()
Stop stops the DogStatsD server