Documentation ¶
Index ¶
- Constants
- func StartRealtimeSync(ctx context.Context, syncInterval time.Duration)
- type IntervalsAndTimers
- type KTime
- type Times
- func (t *Times) GRPCAuthErrorDelay() time.Duration
- func (t *Times) GRPCConnectionTimeout() time.Duration
- func (t *Times) GRPCOperationTimeout() time.Duration
- func (t *Times) GRPCStartupBackoffTime() time.Duration
- func (t *Times) MonitorInterval() time.Duration
- func (t *Times) PIDCleanupInterval() time.Duration
- func (t *Times) ProbabilisticInterval() time.Duration
- func (t *Times) ReportInterval() time.Duration
- func (t *Times) ReportMetricsInterval() time.Duration
- func (t *Times) TracePollInterval() time.Duration
Constants ¶
const ( // GRPCAuthErrorDelay defines the delay before triggering a global process exit after a // gRPC auth error. GRPCAuthErrorDelay = 10 * time.Minute // GRPCConnectionTimeout defines the timeout for each established gRPC connection. GRPCConnectionTimeout = 3 * time.Second // GRPCOperationTimeout defines the timeout for each gRPC operation. GRPCOperationTimeout = 5 * time.Second // GRPCStartupBackoffTimeout defines the time between failed gRPC requests during startup // phase. GRPCStartupBackoffTimeout = 1 * time.Minute )
Variables ¶
This section is empty.
Functions ¶
func StartRealtimeSync ¶
StartRealtimeSync calculates a delta between the monotonic clock (CLOCK_MONOTONIC, rebased to unixtime) and the realtime clock. If syncInterval is greater than zero, it also starts a goroutine to perform that calculation periodically.
Types ¶
type IntervalsAndTimers ¶
type IntervalsAndTimers interface { // MonitorInterval defines the interval for PID event monitoring and metric collection. MonitorInterval() time.Duration // TracePollInterval defines the interval at which we read the trace perf event buffer. TracePollInterval() time.Duration // ReportInterval defines the interval at which collected data is sent to collection agent. ReportInterval() time.Duration // ReportMetricsInterval defines the interval at which collected metrics are sent // to collection agent. ReportMetricsInterval() time.Duration // GRPCConnectionTimeout defines the timeout for each established gRPC connection. GRPCConnectionTimeout() time.Duration // GRPCOperationTimeout defines the timeout for each gRPC operation. GRPCOperationTimeout() time.Duration // GRPCStartupBackoffTime defines the time between failed gRPC requests during startup // phase. GRPCStartupBackoffTime() time.Duration // GRPCAuthErrorDelay defines the delay before triggering a global process exit after a // gRPC auth error. GRPCAuthErrorDelay() time.Duration // PIDCleanupInterval defines the interval at which monitored PIDs are checked for // liveness, and no longer living PIDs are cleaned up. PIDCleanupInterval() time.Duration // ProbabilisticInterval defines the interval for which probabilistic profiling will // be enabled or disabled. ProbabilisticInterval() time.Duration }
IntervalsAndTimers is a meta-interface that exists purely to document its functionality.
type KTime ¶
type KTime int64
KTime stores a time value, retrieved from a monotonic clock, in nanoseconds
func GetKTime ¶
func GetKTime() KTime
GetKTime gets the current time in same nanosecond format as bpf_ktime_get_ns() eBPF call This relies runtime.nanotime to use CLOCK_MONOTONIC. If this changes, this needs to be adjusted accordingly. Using this internal is superior in performance, as it is able to use the vDSO to query the time without syscall.
type Times ¶
type Times struct {
// contains filtered or unexported fields
}
Times hold all the intervals and timeouts that are used across the host agent in a central place and comes with Getters to read them.