Documentation ¶
Overview ¶
Package telemetry holds telemetry related files
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContainersRunningTelemetry ¶
type ContainersRunningTelemetry struct {
// contains filtered or unexported fields
}
ContainersRunningTelemetry reports environment information (e.g containers running) when the runtime security component is running
func NewContainersRunningTelemetry ¶
func NewContainersRunningTelemetry(cfg *config.RuntimeSecurityConfig, statsdClient statsd.ClientInterface, wmeta workloadmeta.Component) (*ContainersRunningTelemetry, error)
NewContainersRunningTelemetry creates a new ContainersRunningTelemetry instance
func (*ContainersRunningTelemetry) Run ¶
func (t *ContainersRunningTelemetry) Run(ctx context.Context)
Run starts the telemetry collection
type ContainersTelemetry ¶
type ContainersTelemetry struct { TelemetrySender SimpleTelemetrySender MetadataStore workloadmeta.Component }
ContainersTelemetry represents the objects necessary to send metrics listing containers
func NewContainersTelemetry ¶
func NewContainersTelemetry(telemetrySender SimpleTelemetrySender, wmeta workloadmeta.Component) (*ContainersTelemetry, error)
NewContainersTelemetry returns a new ContainersTelemetry based on default/global objects
func (*ContainersTelemetry) ListRunningContainers ¶
func (c *ContainersTelemetry) ListRunningContainers() []*workloadmeta.Container
ListRunningContainers returns the list of running containers (from the workload meta store)
func (*ContainersTelemetry) ReportContainers ¶
func (c *ContainersTelemetry) ReportContainers(metricName string)
ReportContainers sends the metrics about currently running containers This function is critical for CWS/CSPM metering. Please tread carefully.
type SimpleTelemetrySender ¶
SimpleTelemetrySender is an abstraction over what is needed for the container telemetry the main goal is to be able to use it with a dogstatsd client or a SenderManager's default sender
func NewSimpleTelemetrySenderFromStatsd ¶
func NewSimpleTelemetrySenderFromStatsd(sci statsd.ClientInterface) SimpleTelemetrySender
NewSimpleTelemetrySenderFromStatsd returns a new SimpleTelemetrySender from a statsd client