GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||
GeezerVison is showing github.com — improvement(new-relic): validate integration against NerdGraph docs, surface more entity fields by waleedlatif1 · Pull Request #5443 · simstudioai/sim Conversation
Collaborator
Summary
Type of Change
TestingTested manually: typecheck ( Checklist
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
…surface more entity fields - Audited all 4 New Relic tools (nrql_query, search_entities, get_entity, create_deployment_event) plus the block against live NerdGraph API docs; request/response shapes, auth, region endpoints, and GraphQL injection handling all confirmed correct. - Added domain, reporting, alertSeverity, and tags to get_entity and search_entities outputs — stable Entity schema fields we weren't surfacing. Purely additive, no existing fields changed. - Skipped NerdGraph's aiIssues/incidents API; New Relic marks it "unsafe experimental" and requires an opt-in header, not worth the fragility.
|
There was an error while loading. Please reload this page.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
PR SummaryLow Risk Overview The New Relic block’s Reviewed by Cursor Bugbot for commit 7729599. Configure here. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Greptile SummaryThis PR extends the New Relic integration by surfacing four additional entity fields (
Confidence Score: 5/5Safe to merge — changes are purely additive, all new fields are null-coalesced, and both tools now share the same normalization path. The raw-entity passthrough concern raised in the previous review has been fully addressed: search_entities now maps every entity through normalizeNewRelicEntity before returning it, matching what get_entity already did. The new normalizeNewRelicEntity utility handles every nullable field consistently, the inline fragment names (AlertableEntityOutline vs AlertableEntity) are correct for their respective query contexts, and gqlString (backed by JSON.stringify) prevents GraphQL injection in the get_entity query. No existing fields or response shapes were changed. No files require special attention. Important Files Changed
Sequence Diagram%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
participant Caller
participant Tool as get_entity / search_entities
participant Utils as utils.ts
participant NerdGraph as New Relic NerdGraph
Caller->>Tool: invoke(params)
Tool->>NerdGraph: POST /graphql (guid/query/cursor, new fields: domain, reporting, alertSeverity, tags)
NerdGraph-->>Tool: "GraphQLResponse<RawEntity[]>"
Tool->>Utils: parseNerdGraphResponse()
Utils-->>Tool: typed payload
Tool->>Utils: normalizeNewRelicEntity(rawEntity)
Note over Utils: null-coalesces guid, name, entityType,<br/>domain, reporting, alertSeverity, tags
Utils-->>Tool: NewRelicEntity (fully normalized)
Tool-->>Caller: "{ success, output: { entity / entities } }"
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
participant Caller
participant Tool as get_entity / search_entities
participant Utils as utils.ts
participant NerdGraph as New Relic NerdGraph
Caller->>Tool: invoke(params)
Tool->>NerdGraph: POST /graphql (guid/query/cursor, new fields: domain, reporting, alertSeverity, tags)
NerdGraph-->>Tool: "GraphQLResponse<RawEntity[]>"
Tool->>Utils: parseNerdGraphResponse()
Utils-->>Tool: typed payload
Tool->>Utils: normalizeNewRelicEntity(rawEntity)
Note over Utils: null-coalesces guid, name, entityType,<br/>domain, reporting, alertSeverity, tags
Utils-->>Tool: NewRelicEntity (fully normalized)
Tool-->>Caller: "{ success, output: { entity / entities } }"
Reviews (3): Last reviewed commit: "fix(new-relic): gate alertSeverity behin..." | Re-trigger Greptile |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…ization search_entities passed raw NerdGraph entities straight through, so tags/ domain/reporting/alertSeverity could arrive as null/undefined at runtime despite the non-nullable NewRelicEntity type contract — a .map() on a null tags array would throw. get_entity already normalized these fields correctly. Extracted the normalization into a shared normalizeNewRelicEntity() in utils.ts and reuse it from both tools, so the two can't drift again.
|
Fixed — extracted a shared |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@greptile review |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@cursor review |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit bf5beaa. Configure here.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…fragments
alertSeverity isn't a direct field on New Relic's Entity/EntityOutline
types — it only exists on the AlertableEntity/AlertableEntityOutline
sub-interfaces, and NerdGraph rejects the query outright without the
inline fragment. get_entity.ts (entity(guid), returns Entity) now uses
`... on AlertableEntity { alertSeverity }`; search_entities.ts
(entitySearch, returns EntityOutline) now uses
`... on AlertableEntityOutline { alertSeverity }`. Confirmed against
New Relic's live NerdGraph entities API docs.
|
Follow-up from an additional independent verification pass (re-checked every field against New Relic's live NerdGraph docs from scratch, including backwards-compat diffing against origin/staging): found that |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@greptile review |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@cursor review |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 7729599. Configure here.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
77295994
Deployed
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.