Documentation
¶
Overview ¶
Package agenttelemetryimpl provides the implementation of the agenttelemetry component.
Index ¶
- type AgentMetadataPayload
- type AgentMetricConfig
- type AgentMetricsPayload
- type BatchPayloadWrapper
- type Config
- type Event
- type ExcludeMetricConfig
- type HostPayload
- type Log
- type LogLevel
- type LogsPayload
- type MetricConfig
- type MetricPayload
- type Payload
- type Profile
- type Provides
- type Requires
- type Schedule
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentMetadataPayload ¶
type AgentMetadataPayload struct {
HostID string `json:"hostid"`
Hostname string `json:"hostname"`
OS string `json:"os"`
OSVer string `json:"osver"`
}
AgentMetadataPayload should be top level object in the payload but currently tucked into specific payloads until backend will be adjusted properly
type AgentMetricConfig ¶
type AgentMetricConfig struct {
Exclude *ExcludeMetricConfig `yaml:"exclude,omitempty"`
Metrics []MetricConfig `yaml:"metrics,omitempty"`
}
AgentMetricConfig specifies agent telemetry metrics payloads to be generated and emitted
type AgentMetricsPayload ¶
type AgentMetricsPayload struct {
Message string `json:"message"`
Metrics map[string]interface{} `json:"metrics"`
}
AgentMetricsPayload defines Metrics object
type BatchPayloadWrapper ¶
type BatchPayloadWrapper struct {
RequestType string `json:"request_type"`
Payload interface{} `json:"payload"`
}
BatchPayloadWrapper exported so it can be turned into json
type Config ¶
type Config struct {
Enabled bool `yaml:"enabled"`
Profiles []*Profile `yaml:"profiles"`
StartupTraceSampling float64 `yaml:"startup_trace_sampling"`
// contains filtered or unexported fields
}
Config is the top-level config for agent telemetry
type Event ¶
type Event struct {
Name string `yaml:"name"` // required
RequestType string `yaml:"request_type"` // required
PayloadKey string `yaml:"payload_key"` // required
Message string `yaml:"message"` // required
}
Event is a payload sent by Agent Telemetry component client
type ExcludeMetricConfig ¶
type ExcludeMetricConfig struct {
ZeroMetric *bool `yaml:"zero_metric,omitempty"`
Tags []string `yaml:"tags,omitempty"`
}
ExcludeMetricConfig specifies agent telemetry metrics to be excluded from the agent telemetry
type HostPayload ¶
type HostPayload struct {
Hostname string `json:"hostname"`
}
HostPayload defines the host payload object. It is currently used only as payload's header and it is not stored with backend. It could be removed in the future completly. It is expected by backend to be present in the payload and currently tootaly reducted.
type Log ¶ added in v0.82.0
type Log struct {
Message string `json:"message"`
Tags string `json:"tags"`
Level LogLevel `json:"level"`
StackTrace string `json:"stack_trace"`
TracerTime int64 `json:"tracer_time"`
Count int `json:"count"`
TraceID string `json:"trace_id"`
SpanID string `json:"span_id"`
IsCrash bool `json:"is_crash"`
ErrorKind string `json:"error_kind"`
}
Log mirrors dd-go's tracer-telemetry-intake/telemetry-payload/logs.go::Log verbatim. All fields are emitted on the wire (omitempty would change the wire format and is intentionally avoided so dd-go's Validate() sees the canonical shape).
type LogLevel ¶ added in v0.82.0
type LogLevel string
LogLevel is the wire-level severity of a single log record. The dd-go intake accepts "ERROR", "WARN", "DEBUG" (and "INFO" when the envelope request_type is "debug-logs"), but the errortracking path only ever emits LogLevelError; the other constants were dropped as dead code per iglendd's "why bother with anything but ERRORS" thread on PR #50607.
const (
LogLevelError LogLevel = "ERROR"
)
LogLevel value emitted on the wire by the errortracking path.
type LogsPayload ¶ added in v0.82.0
type LogsPayload struct {
Logs []Log `json:"logs"`
}
LogsPayload is the inner "payload" field of the apmtelemetry envelope when the request_type is "logs". The outer key is "logs" (NOT "records") per dd-go's LogsPayload definition.
type MetricConfig ¶
type MetricConfig struct {
Name string `yaml:"name"` // required
PreserveTags []string `yaml:"preserve_tags,omitempty"`
AggregateTags []string `yaml:"aggregate_tags,omitempty"` // deprecated: use preserve_tags
AggregateTotal bool `yaml:"aggregate_total"`
// contains filtered or unexported fields
}
MetricConfig is a list of metric selecting subset of telemetry.Gather() metrics to be included in agent
type MetricPayload ¶
type MetricPayload struct {
Value float64 `json:"value"`
Type string `json:"type"`
Tags map[string]interface{} `json:"tags,omitempty"`
Buckets map[string]uint64 `json:"buckets,omitempty"`
P75 *float64 `json:"p75,omitempty"`
P95 *float64 `json:"p95,omitempty"`
P99 *float64 `json:"p99,omitempty"`
}
MetricPayload defines Metric object
type Payload ¶
type Payload struct {
APIVersion string `json:"api_version"`
RequestType string `json:"request_type"`
EventTime int64 `json:"event_time"`
DebugFlag bool `json:"debug"`
Host HostPayload `json:"host"`
Payload interface{} `json:"payload"`
}
Payload defines the top level object in the payload
type Profile ¶
type Profile struct {
// parsed
Name string `yaml:"name"`
Metric *AgentMetricConfig `yaml:"metric,omitempty"`
Schedule *Schedule `yaml:"schedule,omitempty"`
Events []*Event `yaml:"events"`
// contains filtered or unexported fields
}
Profile is a single agent telemetry profile
type Provides ¶
type Provides struct {
compdef.Out
Comp agenttelemetry.Component
Endpoint api.AgentEndpointProvider
}
Provides defines the output of the agenttelemetry component
func NewComponent ¶
NewComponent creates a new agent telemetry component.