Skip to content

feat(core): add support for poll_rate agent config - #2716

Open
abhilash-sivan wants to merge 4 commits into
mainfrom
fix-poll-rate-agent-config
Open

feat(core): add support for poll_rate agent config#2716
abhilash-sivan wants to merge 4 commits into
mainfrom
fix-poll-rate-agent-config

Conversation

@abhilash-sivan

@abhilash-sivan abhilash-sivan commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

@abhilash-sivan
abhilash-sivan marked this pull request as ready for review September 9, 2026 06:28
@abhilash-sivan
abhilash-sivan requested a review from a team as a code owner September 9, 2026 06:28

metrics: {
transmissionDelay: 1000,
transmissionDelay: 30000,

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.

?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ah, this was a mistake; I fixed the changes in #2713
I will merge 2713 first and rebase this; I will keep it as 1000

exports.DEFAULT_LOG_LEVEL = exports.LOG_LEVEL.WARN;

// Allowed poll rate values in milliseconds, matching the agent's supported poll_rate seconds:
// [1, 5, 10, 20, 30, 60]

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.

Do we have a card to update it to 600s?

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.


// Allowed poll rate values in milliseconds, matching the agent's supported poll_rate seconds:
// [1, 5, 10, 20, 30, 60]
exports.allowedTransmissionDelayValues = [1000, 5000, 10000, 20000, 30000, 60000];

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.

🤔 I thought customer can set any value between 1 and 60s

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Don't think so.

Code from sensor:

private static final int[] VALID_POLL_RATES = {1, 5, 10, 20, 30, 60, 120, 180, 240, 300, 360, 420, 480, 540, 600};

/**

  • Normalizes a poll rate configuration value to the nearest valid poll rate.
  • Valid poll rates are: 1, 5, 10, 20, 30, 60, 120, 180, 240, 300, 360, 420, 480, 540, 600 seconds.
  • @PARAM input the poll rate configuration value (can be any Number subclass or String)
  • @return the normalized poll rate in seconds (always a valid poll rate value)
    */
    public static int normalizePollRate(Object input) {
    return normalizePollRate(input, 1);
    }

There is already a common normaliser which normalized the value to the allowed list, out allowed list is a subset of this

@kirrg001 kirrg001 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.

See comments.
Also: The commit is a feature not a fix.

@abhilash-sivan abhilash-sivan changed the title fix(core): add support for poll_rate agent config feat(core): add support for poll_rate agent config Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants