Skip to content

Adding New Relic Custom Agents - #6269

Merged
aaronpowell merged 8 commits into
github:mainfrom
jcountsNR:main
Nov 11, 2026
Merged

aaronpowell merged 8 commits into
github:mainfrom
jcountsNR:main

Conversation

@jcountsNR

@jcountsNR jcountsNR commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Pull Request Checklist

  • I have read and followed the CONTRIBUTING.md guidelines.
  • I have read and followed the Guidance for submissions involving paid services.
  • My contribution adds a new instruction, prompt, agent, skill, workflow, or canvas extension file in the correct directory.
  • The file follows the required naming convention.
  • The content is clearly structured and follows the example format.
  • I have tested my instructions, prompt, agent, skill, workflow, or canvas extension with GitHub Copilot.
  • I have run npm start and verified that README.md is up to date.
  • I am targeting the main branch for this pull request.

Description

Summary

  • Align New Relic APM, FinOps, Kubernetes, and incident-response agents with current Copilot models and New Relic MCP tools.
  • Replace generic APM guidance with a focused New Relic investigation workflow.
  • Remove the duplicate generic New Relic MCP agent and prompt-secrecy boilerplate.
  • Clarify that CloudCostV2Test is an example test dataset, not a universal production event type.
  • Regenerate the agent README.

Validation

  • npm run build passed.
  • Diagnostics passed for all four New Relic agents.
  • git diff --check passed.

Copilot Testing

Live testing with a configured New Relic MCP server was not performed. Before merge, select each agent in Copilot and verify its tools and a representative read-only query against a test account.


Type of Contribution

  • New instruction file.
  • New prompt file.
  • New agent file.
  • New plugin.
  • New skill file.
  • New agentic workflow.
  • New canvas extension.
  • Update to existing instruction, prompt, agent, plugin, skill, workflow, or canvas extension.
  • Other (please specify):

Additional Notes


By submitting this pull request, I confirm that my contribution abides by the Code of Conduct and will be licensed under the MIT License.

@jcountsNR
jcountsNR requested review from a team as code owners November 5, 2026 17:42
Copilot AI dynamic review requested due to automatic review settings November 5, 2026 17:42
@github-actions github-actions Bot added agent PR touches agents new-submission PR adds at least one new contribution labels Nov 5, 2026
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

🔒 PR Risk Scan Results

Scanned 4 changed file(s).

Severity Count
🔴 High 0
🟠 Medium 0
ℹ️ Info 0

✅ No matching risk patterns were detected in changed files.

This is an automated soft-gate report. Findings indicate review targets and do not block merge by themselves.

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

🔍 Vally Lint Results

⚠️ Warnings or advisories found

Scope Checked
Skills 0
Agents 4
Total 4
Severity Count
❌ Errors 0
⚠️ Warnings 0
ℹ️ Advisories 1

Summary

Level Finding
ℹ️ Vally currently lints SKILL.md content. Agent files were detected but skipped:
Full linter output
### Agent files detected (not linted by vally)
ℹ️ Vally currently lints SKILL.md content. Agent files were detected but skipped:
agents/new-relic-apm.agent.md
agents/new-relic-finops.agent.md
agents/new-relic-incident-response.agent.md
agents/new-relic-kubernetes.agent.md

@github-actions github-actions Bot added merge-risk:medium ready-for-review Submission passed intake validation and is ready for maintainer review labels Nov 5, 2026
@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

🚦 Submission status: 👀 Ready for review

Risk tier: merge-risk:medium — New or substantially changed resource without privileged execution
Required to merge: passing submission-gate checks plus 1 approval from reviewers with write access.

Why this tier
  • Adds 3 file(s), e.g. agents/new-relic-apm.agent.md
  • Changes 668 lines (low-risk limit is 40)

Automated checks

Check Status Details
Line endings ✅ Passed Passed · logs
Spelling ✅ Passed Passed · logs
Generated README consistency ✅ Passed Passed · logs
Skill lint (vally) ✅ Passed Passed · logs
Risk scan ✅ Passed Passed · logs
Contributor reputation ✅ Passed Passed · logs
Duplicate resource scan ⚠️ Failed (advisory, non-blocking) The workflow did not complete successfully · logs
PR quality signal ⏭️ Skipped Skipped by its workflow · logs

Action needed

  • ⚠️ Advisory checks did not complete (Duplicate resource scan). This does not block the PR.

Review

  • Approvals: 0/1
  • Assigned reviewer: not assigned yet — comment /request-review to ask for one
  • Review target date: not set
  • Still needed: 1 more approval(s)
  • No staffed reviewer pool owns these files yet; any reviewer with write access counts as the domain reviewer.

Commands

Command Who What it does
/rerun-checks PR author, maintainers Re-runs failed or incomplete checks and re-evaluates this gate
/request-review PR author, maintainers Asks the review rotation to assign a reviewer (adds needs-reviewer)

Updated for 6744659 · gate run · This comment is maintained automatically — see submission gate docs.

@jcountsNR

Copy link
Copy Markdown
Contributor Author

Note that this is an update for PR#5174

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.

🟡 Changes recommended

The scalar tools declarations cause tools.forEach to throw a TypeError, blocking website metadata generation.

5 open issues
What changed in this PR

Expands the New Relic agent collection with focused APM, FinOps, and Kubernetes investigation workflows and updates the existing incident-response agent.

Changes:

  • Adds three agents with New Relic MCP guidance and domain-specific investigation examples.
  • Updates model preferences across all four agents and clarifies the FinOps example dataset.
  • Regenerates the agent catalog with descriptions and installation links.
File Description
docs/​README.agents.md Adds catalog entries for the three new agents.
agents/​new-relic-kubernetes.agent.md Adds Kubernetes diagnostics and telemetry query examples.
agents/​new-relic-incident-response.agent.md Updates model preferences.
agents/​new-relic-finops.agent.md Adds cloud-cost analysis workflows and NRQL examples.
agents/​new-relic-apm.agent.md Adds a focused application-performance investigation workflow.

Review effort: Balanced (auto)

- MAI-Code-1.1-Flash
- Kimi K3
- Grok 4.7
tools: new-relic-mcp-server/*
Comment thread agents/new-relic-finops.agent.md Resolved
Comment thread agents/new-relic-kubernetes.agent.md Resolved
Comment thread agents/new-relic-kubernetes.agent.md Resolved
Comment thread agents/new-relic-kubernetes.agent.md Resolved
Added namespace filter to Kubernetes event query

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI dynamic review requested due to automatic review settings November 5, 2026 18:17
@github-actions github-actions Bot added awaiting-automation and removed ready-for-review Submission passed intake validation and is ready for maintainer review labels Nov 5, 2026
@github-actions github-actions Bot added ready-for-review Submission passed intake validation and is ready for maintainer review and removed awaiting-automation labels Nov 5, 2026

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.

🟡 Changes recommended

Scalar tools declarations in the FinOps and Kubernetes agent profiles cause tools.forEach(...) to throw, blocking website data generation and deployment.

2 open issues
2 previously missed issues

In code that hasn't changed since last review

Medium severity Exclude succeeded Jobs from the pod readiness check

agents/​new-relic-kubernetes.agent.md:165

A successfully completed Job pod has status = 'Succeeded' and is no longer ready, so this predicate reports healthy completed work as unhealthy. In namespaces with many Jobs, those samples can also consume the 100-row limit and obscure actual failures. Exclude successful completion and apply the readiness check only to running pods.

Medium severity Filter logs by namespace as well as pod

agents/​new-relic-kubernetes.agent.md:265

[P2] Include the namespace in this log filter. Pod names are unique only within a namespace: two namespaces can both contain a StatefulSet pod named redis-0. Filtering only by cluster and pod then mixes their logs, allowing errors from an unrelated workload to be attributed to the investigated pod. Use the namespace established in Step 1.

4 resolved since last review

Review effort: Balanced (auto)

Comment thread agents/new-relic-finops.agent.md Resolved
Update tools section to include new-relic-mcp-server.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI dynamic review requested due to automatic review settings November 5, 2026 18:30
@github-actions github-actions Bot added awaiting-automation and removed ready-for-review Submission passed intake validation and is ready for maintainer review labels Nov 5, 2026
@github-actions github-actions Bot added ready-for-review Submission passed intake validation and is ready for maintainer review and removed awaiting-automation labels Nov 5, 2026

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.

🔵 Needs a closer look

Unresolved query errors can break the cost breakdown, falsely flag completed pods or historical restarts as active problems, and mix logs across namespaces.

1 open issue
3 previously missed issues

In code that hasn't changed since last review

Medium severity Remove unsupported standalone ORDER BY from faceted query

agents/​new-relic-finops.agent.md:188

This is a standalone row-level ORDER BY, which the NRQL reference says does not apply to FACET queries. It is not the FACET ... ORDER BY modifier either, which must immediately follow the facet and use an aggregate function. Remove this unsupported clause; the first selected sum() already ranks facets descending, so LIMIT 10 gives the requested top ten services.

Medium severity Exclude successfully completed pods from unhealthy pod detection

agents/​new-relic-kubernetes.agent.md:165

Successful Job/CronJob pods normally have status = 'Succeeded' and are not Ready, so this predicate reports ordinary completed jobs as unhealthy pods. Exclude successful terminal pods before applying the status/readiness check to avoid false incident candidates in namespaces with batch workloads.

Medium severity Include namespace when querying pod logs

agents/​new-relic-kubernetes.agent.md:265

Pod names are unique only within a namespace. For example, two namespaces can both contain a StatefulSet pod named api-0, so this query combines their logs despite the namespace scoped in investigation step 1. Include namespace_name to avoid diagnosing the selected workload using another namespace's errors.

1 resolved since last review

Review effort: Balanced (auto)

Copilot AI dynamic review requested due to automatic review settings November 9, 2026 00:42
@github-actions github-actions Bot added awaiting-automation and removed ready-for-review Submission passed intake validation and is ready for maintainer review labels Nov 9, 2026
@github-actions github-actions Bot added ready-for-review Submission passed intake validation and is ready for maintainer review and removed awaiting-automation labels Nov 9, 2026

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.

🟡 Changes recommended

The agent examples contain invalid NRQL and filtering errors that can cause query failures, false Kubernetes incidents, misattributed logs, and incomplete cost results.

5 open issues

Review effort: Balanced (auto)

```nrql
SELECT sum(cpu_costs) as 'CPU Cost', sum(memory_costs) as 'Memory Cost'
FROM CloudCostV2Test
WHERE is_k8s = '1'
FROM K8sPodSample
SELECT podName, status, reason, message, nodeName
WHERE clusterName = 'CLUSTER' AND namespaceName = 'NS'
AND (status != 'Running' OR isReady = false)
```nrql
FROM Log
SELECT timestamp, message
WHERE cluster_name = 'CLUSTER' AND pod_name = 'POD_NAME'
Comment on lines +275 to +277
SELECT max(restartCount) - min(restartCount) as 'RestartsInWindow'
WHERE clusterName = 'CLUSTER' AND namespaceName = 'NS'
FACET podName, containerName
@aaronpowell
aaronpowell merged commit 9050274 into github:main Nov 11, 2026
25 of 28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent PR touches agents merge-risk:medium new-submission PR adds at least one new contribution ready-for-review Submission passed intake validation and is ready for maintainer review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants