Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExtendedFAAS ¶
type ExtendedFAAS struct {
ID string `json:"id,omitempty"`
Execution string `json:"execution,omitempty"`
Coldstart bool `json:"coldstart"`
}
func (*ExtendedFAAS) MarshalFastJSON ¶
func (v *ExtendedFAAS) MarshalFastJSON(w *fastjson.Writer) error
type FAAS ¶
type FAAS struct {
// ID holds a unique identifier of the invoked serverless function.
ID string `json:"id,omitempty"`
// Execution holds the request ID of the function invocation.
Execution string `json:"execution,omitempty"`
}
faas struct is a subset of go.elastic.co/apm/v2/model#FAAS
The purpose of having a separate struct is to have a custom marshaling logic that is targeted for the faas fields available for function logs. For example: `coldstart` value cannot be inferred for function logs so this struct drops the field entirely.
type LogContainer ¶
type LogContainer struct {
Log *LogLine `json:"log,omitempty"`
}
func (*LogContainer) MarshalFastJSON ¶
func (v *LogContainer) MarshalFastJSON(w *fastjson.Writer) error
type LogLine ¶
type Metrics ¶
type Metrics struct {
Timestamp Time `json:"timestamp"`
FAAS *ExtendedFAAS `json:"faas,omitempty"`
Samples map[string]Metric `json:"samples,omitempty"`
}
type MetricsContainer ¶
type MetricsContainer struct {
Metrics *Metrics `json:"metricset,omitempty"`
}
func (MetricsContainer) Add ¶
func (mc MetricsContainer) Add(name string, value float64)
Add adds a metric with the given name, labels, and value, The labels are expected to be sorted lexicographically.
func (MetricsContainer) MarshalFastJSON ¶
func (v MetricsContainer) MarshalFastJSON(w *fastjson.Writer) error
Click to show internal directories.
Click to hide internal directories.