agenttelemetryimpl

package module
v0.82.2 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2026 License: Apache-2.0 Imports: 39 Imported by: 1

Documentation

Overview

Package agenttelemetryimpl provides the implementation of the agenttelemetry component.

Index

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

func NewComponent(deps Requires) Provides

NewComponent creates a new agent telemetry component.

type Requires

type Requires struct {
	compdef.In

	Log       log.Component
	Config    config.Component
	Telemetry telemetry.Component

	Lc compdef.Lifecycle
}

Requires defines the dependencies for the agenttelemetry component

type Schedule

type Schedule struct {
	// parsed
	StartAfter uint `yaml:"start_after"`
	Iterations uint `yaml:"iterations"`
	Period     uint `yaml:"period"`
}

Schedule is a schedule for agent telemetry payloads to be generated and emitted

Jump to

Keyboard shortcuts

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