telemetry

package
v0.0.0-...-eb3d71d Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

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

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

type SimpleTelemetrySender interface {
	Gauge(name string, value float64, tags []string)
	Commit()
}

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

Jump to

Keyboard shortcuts

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