workloadmeta/

directory
v0.0.0-...-47294c1 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2024 License: Apache-2.0

README

Workloadmeta Store

This package is responsible for gathering information about workloads and disseminating that to other components.

Entities

An Entity represents a single unit of work being done by a piece of software, like a process, a container, a Kubernetes pod, or a task in any cloud provider, that the agent would like to observe. The current workload of a host or cluster is represented by the current set of entities.

Each Entity has a unique EntityID, composed of a Kind and an ID. Examples of kinds include container, pod, and task. The full list is in the documentation for the Kind type.

Note that in this package, entities are always identified by EntityID (kind and ID), not with a URL-like string.

Sources

The Workloadmeta Store monitors information from various sources. Examples of sources include container runtimes and various orchestrators. The full list is in the documentation for the Source type.

Multiple sources may generate events about the same entity. When this occurs, information from those sources is merged into one entity.

Store

The Store is the central component of the package, storing the set of entities. A store has a set of collectors responsible for notifying the store of workload changes. Each collector is specialized to a particular external service such as Kubernetes or ECS, roughly corresponding to a source. Collectors can either poll for updates, or translate a stream of events from the external service, as appropriate.

The store provides information to other components either through subscriptions or by querying the current state.

Subscription

Subscription provides a channel containing event bundles. Each event in a bundle is either a "set" or "unset". A "set" event indicates new information about an entity -- either a new entity, or an update to an existing entity. An "unset" event indicates that an entity no longer exists. The first event bundle to each subscriber contains a "set" event for each existing entity at that time. It's safe to assume that this first bundle corresponds to entities that existed before the agent started.

Telemetry and Debugging

The Workloadmeta Store produces agent telemetry measuring the behavior of the component. The metrics are defined in comp/core/workloadmeta/telemetry/telemetry.go

The agent workload-list command will print the workload content of a running agent.

The code in comp/core/workloadmeta/dumper logs all events verbosely, and may be useful when debugging new collectors. It is not built by default; see the comments in the package for how to set it up.

Directories

Path Synopsis
collectors
catalog
Package catalog is a wrapper that loads the available workloadmeta collectors.
Package catalog is a wrapper that loads the available workloadmeta collectors.
catalog-core
Package catalog is a wrapper that loads the available workloadmeta collectors.
Package catalog is a wrapper that loads the available workloadmeta collectors.
catalog-less
Package catalog is a wrapper that loads workloadmeta collectors, while having less than the full set.
Package catalog is a wrapper that loads workloadmeta collectors, while having less than the full set.
internal/cloudfoundry/container
Package container provides a workloadmeta collector for CloudFoundry container
Package container provides a workloadmeta collector for CloudFoundry container
internal/cloudfoundry/vm
Package vm provides a workloadmeta collector for CloudFoundry VM
Package vm provides a workloadmeta collector for CloudFoundry VM
internal/containerd
Package containerd provides the containerd colletor for workloadmeta
Package containerd provides the containerd colletor for workloadmeta
internal/docker
Package docker provides the docker collector for workloadmeta
Package docker provides the docker collector for workloadmeta
internal/ecs
Package ecs provides the ecs colletor for workloadmeta
Package ecs provides the ecs colletor for workloadmeta
internal/ecsfargate
Package ecsfargate provides the ecsfargate colletor for workloadmeta
Package ecsfargate provides the ecsfargate colletor for workloadmeta
internal/kubeapiserver
Package kubeapiserver provides the kubeapiserver colletor for workloadmeta
Package kubeapiserver provides the kubeapiserver colletor for workloadmeta
internal/kubelet
Package kubelet provides the kubelet colletor for workloadmeta
Package kubelet provides the kubelet colletor for workloadmeta
internal/kubemetadata
Package kubemetadata implements the kube_metadata Workloadmeta collector.
Package kubemetadata implements the kube_metadata Workloadmeta collector.
internal/podman
Package podman provides the docker collector for workloadmeta
Package podman provides the docker collector for workloadmeta
internal/process
Package process implements the local process collector for Workloadmeta.
Package process implements the local process collector for Workloadmeta.
internal/remote
Package remote implements a generic workloadmeta Collector that receives events from a remote workloadmeta server.
Package remote implements a generic workloadmeta Collector that receives events from a remote workloadmeta server.
internal/remote/processcollector
Package processcollector implements the remote process collector for Workloadmeta.
Package processcollector implements the remote process collector for Workloadmeta.
internal/remote/workloadmeta
Package workloadmeta implements the remote workloadmeta Collector.
Package workloadmeta implements the remote workloadmeta Collector.
util
Package util contains utility functions for workload metadata collectors
Package util contains utility functions for workload metadata collectors
Package workloadmeta provides the workloadmeta component for the Datadog Agent
Package workloadmeta provides the workloadmeta component for the Datadog Agent
Package defaults provides the default workloadmeta configuration for the agent.
Package defaults provides the default workloadmeta configuration for the agent.
Package fx provides the fx module for the workloadmeta component.
Package fx provides the fx module for the workloadmeta component.
Package workloadmetaimpl implements the Workloadmeta component.
Package workloadmetaimpl implements the Workloadmeta component.
Package proto provides conversions between Workloadmeta types and protobuf.
Package proto provides conversions between Workloadmeta types and protobuf.
Package server implements a gRPC server that streams the entities stored in Workloadmeta.
Package server implements a gRPC server that streams the entities stored in Workloadmeta.
Package telemetry defines the telemetry for the Workloadmeta component.
Package telemetry defines the telemetry for the Workloadmeta component.

Jump to

Keyboard shortcuts

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