Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions checks/net.go
Original file line number Diff line number Diff line change
Expand Up @@ -471,12 +471,12 @@ func (c *ConnectionsCheck) formatConnections(
}
}
} else {
unsentNonRootObservations = -1
unsentNonRootConnectionMetrics = -1
unsentNonRootObservations = 0
unsentNonRootConnectionMetrics = 0
}
} else {
unsentNonRootObservations = -1
unsentNonRootConnectionMetrics = -1
unsentNonRootObservations = 0
unsentNonRootConnectionMetrics = 0
}

connectionMetricsProcessedCounter.WithLabelValues("no_process").Add(connectionMetricNoProcess)
Expand Down
12 changes: 8 additions & 4 deletions checks/process.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ func (p *ProcessCheck) Run(cfg *config.AgentConfig, featureFlags features.Featur
return nil, nil
}

var messages []model.MessageBody
var messages = make([]model.MessageBody, 0, 0)

processes, topUsage, whiteListedLongLiving := p.fmtProcesses(cfg, procs, pidToCid, cpuTimes[0], p.lastCPUTime, p.lastRun)

Expand All @@ -147,12 +147,16 @@ func (p *ProcessCheck) Run(cfg *config.AgentConfig, featureFlags features.Featur

containers, multiMetrics := retrieveMetricsAndFormat(cfg, ctrList)

if cfg.EnableIncrementalPublishing && featureFlags.FeatureEnabled(features.IncrementalTopology) && time.Now().Before(p.lastRefresh.Add(cfg.IncrementalPublishingRefreshInterval)) {
// Always send increment (to allow for low-latency deletes)
if cfg.EnableIncrementalPublishing && featureFlags.FeatureEnabled(features.IncrementalTopology) {
log.Debug("Sending process status increment")
messages = p.fmtIncrement(cfg, groupID, buildIncrement(processes, containers, p.lastProcState, p.lastCtrState))
} else {
}

// Sometimes also add the full snapshot, in case some of the data was lost
if (!cfg.EnableIncrementalPublishing) || (!featureFlags.FeatureEnabled(features.IncrementalTopology)) || time.Now().After(p.lastRefresh.Add(cfg.IncrementalPublishingRefreshInterval)) {
Comment thread
craffit marked this conversation as resolved.
log.Debug("Sending process status snapshot")
messages = p.fmtSnapshot(cfg, groupID, processes, containers)
messages = append(messages, p.fmtSnapshot(cfg, groupID, processes, containers)...)
p.lastRefresh = time.Now()
}

Expand Down