Skip to content

Add support for AIM SSC. - #1793

Merged
umaannamalai merged 11 commits into
mainfrom
aim-ssc
Jul 22, 2026
Merged

Add support for AIM SSC.#1793
umaannamalai merged 11 commits into
mainfrom
aim-ssc

Conversation

@umaannamalai

Copy link
Copy Markdown
Contributor

Support server side configuration of AIM settings in NR1

Precedence:
If ai_monitoring.enabled is present in the connect response, this value MUST take precedence to override the ai_monitoring.enabled value and fallback on using the value from collect_ai. For example, if collect_ai is False, and ai_monitoring.enabled locally is True, the agent would ultimately disable AI Monitoring. If both collect_ai is False and ai_monitoring.enabled is True in the connect response, ai_monitoring.enabled would ultimately enable AI Monitoring. If HSM is enabled, the appropriate AI monitoring settings SHOULD be set appropriately in the connect response. As a safeguard however, agents SHOULD also enforce HSM mode on AI settings they receive from the connect response.

@github-actions

github-actions Bot commented Jul 15, 2026

Copy link
Copy Markdown

MegaLinter analysis: Success

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ ACTION actionlint 9 0 0 1.07s
✅ MARKDOWN markdownlint 7 0 0 0 1.34s
✅ PYTHON ruff 1065 0 0 0 1.18s
✅ PYTHON ruff-format 1065 0 0 0 0.36s
✅ YAML prettier 23 0 0 0 1.65s
✅ YAML v8r 23 0 0 6.75s
✅ YAML yamllint 23 0 0 0.73s

Notices

📣 MegaLinter 9.5.0 is out! Discover the new features and security recommendations in the release announcement. (Skip this info by defining SECURITY_SUGGESTIONS: false)

See detailed reports in MegaLinter artifacts

MegaLinter is graciously provided by OX Security
Show us your support by starring ⭐ the repository

@mergify mergify Bot added the tests-failing Tests failing in CI. label Jul 15, 2026
@codecov-commenter

codecov-commenter commented Jul 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.06%. Comparing base (6b6dc03) to head (1fe803a).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1793      +/-   ##
==========================================
+ Coverage   81.98%   82.06%   +0.07%     
==========================================
  Files         216      216              
  Lines       26796    26806      +10     
  Branches     4242     4245       +3     
==========================================
+ Hits        21970    21999      +29     
+ Misses       3355     3340      -15     
+ Partials     1471     1467       -4     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread newrelic/core/config.py Outdated
# precedence over the value of collect_ai.
# Apply collect_ai first so that when agent_config settings from SSC
# are applied, they will override collect_ai if needed.
collect_ai = server_side_config.get("collect_ai", None)

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.

Shouldn't this be agent_config instead of server_side_config?

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 need to do a pop here instead of a get to ensure it doesn't loop over this same setting and override the value out of order in the code below?

@umaannamalai umaannamalai Jul 20, 2026

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.

collect_ai actually isn't sent up in the agent_config block. It is its own key within the connect response payload.

I can add a pop for collect_ai. The call to apply_config_setting(settings_snapshot, name, value) in the server_side_config loop shouldn't actually affect any logic with ai_monitoring.enabled since it's looking for the name collect_ai. However, it isn't necessary to store the value of collect_ai in the settings_snapshot if we've already done the override on line 1663 so I can get rid of it.

@hmstepanek
hmstepanek marked this pull request as ready for review July 17, 2026 18:24
@hmstepanek
hmstepanek requested a review from a team as a code owner July 17, 2026 18:24
@mergify mergify Bot removed the tests-failing Tests failing in CI. label Jul 17, 2026
@mergify mergify Bot added the tests-failing Tests failing in CI. label Jul 20, 2026
@mergify mergify Bot removed the tests-failing Tests failing in CI. label Jul 21, 2026
@mergify

mergify Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@umaannamalai
umaannamalai merged commit fc3aa8a into main Jul 22, 2026
65 checks passed
@umaannamalai
umaannamalai deleted the aim-ssc branch July 22, 2026 22:53
@hmstepanek hmstepanek added this to the v13.3.0 milestone Jul 23, 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.

3 participants