New Relic APM errors →
merged AI pull request
Agentopias by CynetIQ queries New Relic via NerdGraph, auto-imports new errors per APM entity, runs an AI agent pipeline against the right repo, opens a pull request, and (optionally) writes a deploy marker back when the PR merges. Built-in OWASP-aware reviewer for security-tagged entities.
The flow, end to end
- 1Map New Relic entities to reposBrowse your APM entities in agentopia. For each entity GUID you care about, map it to a repo (GitHub or Azure DevOps).
- 2Auto-import every 5 minutesThe Agentopias by CynetIQ worker queries NerdGraph for new errors per entity. Each error is fingerprinted by (entity, error_class, message) and deduplicated. New ones become tasks with the errors-inbox link.
- 3Integration Rules tag and routeMatch by entity GUID, entity name, or error class. Route security-tagged entities to the security_developer reviewer.
- 4AI pipeline runsanalyzer → planner → developer → reviewer. The reviewer runs OWASP-aware AI review and produces severity + score.
- 5PR opened on GitHub or Azure DevOpsPull request with the patch, AI review, and the New Relic errors-inbox link. Optional: write a New Relic deploy marker when the PR merges.
What you get out of the box
Setup in 5 minutes
- Create a User API key in New Relic (one.newrelic.com → API keys).
- In Agentopias by CynetIQ → Integrations → New Relic, paste the key, select US or EU base URL, set your account ID.
- Browse your APM entities in Agentopias by CynetIQ and click Map for each one.
- Pick the target repo for each mapping.
- Toggle Auto-import on the mappings you want Agentopias by CynetIQ to watch.
Frequently asked
How does Agentopias by CynetIQ pull errors from New Relic?
Agentopias by CynetIQ uses the New Relic NerdGraph API (GraphQL). You configure an entity mapping that ties an APM entity GUID to one of your Agentopias by CynetIQ repo mappings. Every 5 minutes the worker queries NRQL for new errors on that entity, deduplicates by SHA-256 fingerprint of (entity, error_class, message), and creates an Agentopias by CynetIQ task with the file:line, transaction context, and the New Relic errors-inbox link.
What scopes does the API key need?
A New Relic User API key with read access to the accounts containing the entities you want to monitor. Agentopias by CynetIQ only reads — it does not write back to New Relic. Stored encrypted server-side.
Does it work with EU and US data centers?
Yes — set base URL to https://api.newrelic.com/graphql for US or https://api.eu.newrelic.com/graphql for EU. Account ID lives in the integration’s extra config.
How is file/line extracted from a New Relic error?
For PHP errors, Agentopias by CynetIQ parses the standard error message format /path/to/File.php:123. For other languages, the stack frame is read from the AttributeMap on the error event. If we can’t resolve a precise file:line, the task still imports — the developer agent does its own analysis from the error class + message.
Can I route by entity?
Yes — define an Integration Rule that matches entity GUID or entity name and routes to a specific reviewer agent. Example: entity name contains "billing" → security_developer reviewer + priority critical.
How does this differ from the Sentry integration?
Functionally identical end-to-end (import → AI pipeline → PR → auto-resolve). The mapping shape differs: Sentry maps a project to a repo; New Relic maps an APM entity (GUID) to a repo. You can run both — many teams send web errors to Sentry and backend APM errors to New Relic.
