FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

chore(go.d): log data collection duration when skipping tick by ilyam8 · Pull Request #21425 · netdata/netdata · GitHub

chore(go.d): log data collection duration when skipping tick - #21425

Merged
ilyam8 merged 5 commits into
netdata:masterfrom
ilyam8:chore-go.d-lastCollecDur
Dec 8, 2025
Merged

chore(go.d): log data collection duration when skipping tick#21425
ilyam8 merged 5 commits into
netdata:masterfrom
ilyam8:chore-go.d-lastCollecDur

Conversation

ilyam8 commented Dec 8, 2025
edited by cubic-dev-ai Bot
Loading

Copy link
Copy Markdown
Member
Summary

Track and log data collection timing when ticks are skipped because a previous run is still in progress.

  • Log how long the current collection has been running when skipping
  • Log the total duration of the slow collection when resuming
Test Plan
Additional Information
For users: How does this change affect me?

Summary by cubic

Log how long the current data collection has been running when a tick is skipped, and log the last collection duration when it resumes. Adds start/stop time tracking and includes skip count and interval in logs to help diagnose long-running collectors.

Written for commit 0d773d5. Summary will update automatically on new commits.

ilyam8 requested a review from Copilot December 8, 2025 18:30
github-actions Bot added area/collectors Everything related to data collection collectors/go.d area/go labels Dec 8, 2025
ilyam8 marked this pull request as draft December 8, 2025 18:31

cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

No issues found across 1 file

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Pull request overview

This PR adds tracking and logging of data collection duration when tick skips occur due to a previous collection still being in progress. This helps operators understand why collections are being skipped and whether the collection interval needs to be adjusted.

  • Adds lastCollectDur field to track the duration of the most recent data collection
  • Updates skip warning/info messages to include the last collection duration and interval for better diagnostics
  • Measures collection time by capturing timestamps before and after runOnce() execution

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/go/plugin/go.d/agent/module/job.go Outdated
Comment thread src/go/plugin/go.d/agent/module/job.go Outdated
ilyam8 requested a review from Copilot December 8, 2025 18:41

ilyam8 commented Dec 8, 2025

Copy link
Copy Markdown
Member Author

@cubic-dev-ai review thi PR

cubic-dev-ai Bot commented Dec 8, 2025

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review thi PR

@ilyam8 I've started the AI code review. It'll take a few minutes to complete.

ilyam8 marked this pull request as ready for review December 8, 2025 18:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/go/plugin/go.d/agent/module/job.go Outdated
Comment thread src/go/plugin/go.d/agent/module/job.go Outdated

cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

No issues found across 1 file

cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

1 issue found across 1 file

Prompt for AI agents (all 1 issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="src/go/plugin/go.d/agent/module/job.go">

<violation number="1" location="src/go/plugin/go.d/agent/module/job.go:307">
P2: Data race: `collectStartTime` and `collectStopTime` are read here in `Tick()` while potentially being written concurrently in `Start()`. The unbuffered channel synchronizes only at the send/receive point - after that, both goroutines proceed independently. Consider using a mutex or atomic operations to protect these fields.</violation>
</file>

Reply to cubic to teach it or ask questions. Re-run a review with @cubic-dev-ai review this PR

Comment thread src/go/plugin/go.d/agent/module/job.go Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/go/plugin/go.d/agent/module/job.go Outdated
Comment thread src/go/plugin/go.d/agent/module/job.go Outdated
ilyam8 and others added 2 commits December 8, 2025 21:04
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

ilyam8 commented Dec 8, 2025

Copy link
Copy Markdown
Member Author

@cubic-dev-ai review this PR

cubic-dev-ai Bot commented Dec 8, 2025

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@ilyam8 I've started the AI code review. It'll take a few minutes to complete.

cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

No issues found across 1 file

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

ilyam8 enabled auto-merge (squash) December 8, 2025 19:55
ilyam8 merged commit 733f4fb into netdata:master Dec 8, 2025
123 checks passed
ilyam8 deleted the chore-go.d-lastCollecDur branch December 8, 2025 20:12
vkalintiris pushed a commit that referenced this pull request Dec 9, 2025
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
stelfrag pushed a commit to stelfrag/netdata that referenced this pull request Dec 11, 2025
…#21425)

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
(cherry picked from commit 733f4fb)
stelfrag mentioned this pull request Dec 11, 2025
Ferroin pushed a commit that referenced this pull request Dec 15, 2025
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
(cherry picked from commit 733f4fb)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/collectors Everything related to data collection area/go collectors/go.d

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL