Repository navigation
add the newrelic plugin - #131
Conversation
Members removed from New Relic's Python agent 11.0.0, read from the release note's "Legacy API" table at a docs-website commit. Only the two drop-in replacements are renames (a new Guide field, DropIns); a replacement written as a Markdown link around a code span is read as its name. The numpy and posthog goldens are unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: brandonphelps1212 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: brandonphelps1212 <[email protected]>
|
Claude finished @brandonphelps1212's task in 1m 49s —— View job ✅ Ready to merge. The code and tests follow every repo rule and I found no bugs. Before merging, a maintainer still needs to decide whether the CC BY-NC-SA test excerpt is acceptable (see below). Rules
BugsNone found. For the maintainers: the test data's licenseThe excerpt is CC BY-NC-SA 4.0. The license terms already in this repo's testdata are less restrictive:
The NC (non-commercial) clause is new here. The author flagged it in the PR body. Someone with authority over licensing should sign off on it. If it isn't acceptable, the plugin can stay as it is, and only the 33-line Verified
Non-blocking
Thanks for the thorough source comparison and for testing that the drop test actually reads its input. |
| if g.LinkBase == "" { | ||
| return s | ||
| } | ||
| return strings.ReplaceAll(s, "](/", "]("+strings.TrimSuffix(g.LinkBase, "/")+"/") |
There was a problem hiding this comment.
Non-blocking: a protocol-relative link (](//cdn.example/x)) would also match ](/ and become https://docs.newrelic.com//cdn.example/x. New Relic's release note has no such link today, so nothing breaks now. If another guide sets LinkBase later, one way to rule it out is to skip targets that start with //.
What this changes
Adds
newrelic, an entry for theremovedmembersformat plugin. Part of #85 (I12.7 · Watch New Relic), under #15.python-agent-110000.mdxin newrelic/docs-website at commitf0b4f817(the repo has no tags). It reads the## Removed featurestable,| Legacy API | Replacement API |.package_releaseevents for PyPInewrelic, version11.0.0(a package version: the client's package gate handles it). 11.0.0 is yanked on PyPI; 11.0.1 has the same public API (agent.pyandapi/log.pyare identical).renamed_symbol, 2:agent.add_custom_parameter→agent.add_custom_attribute, andagent.add_custom_parameters→agent.add_custom_attributes. At 10.17.0 each just warns and calls its replacement with the same parameter names, so the client's automatic rename is right on both sides of the upgrade.removed_symbol, 5:agent.accept_distributed_trace_payload,agent.create_distributed_trace_payload,agent.get_browser_timing_footer,agent.record_exceptionandapi.log.NewRelicLogHandler. Their replacements take different arguments or behave differently (the footer returns""at 10.17.0), so a rename would break code. Each replacement is in the hint.lambda_handler&LambdaHandlerWrapperrow (moved to another package; a known gap).import newrelic. The six functions were re-exported bynewrelic/agent.pyat 10.17.0.NewRelicLogHandlerwas only ever innewrelic.api.log.Guide.DropIns: only these become renames;Guide.Doc: the source's name in the hint;Guide.LinkBase: makes the source's site-relative links absolute in the hint, since the hint appears in GitHub issues;soleNamereads a[name](url)cell;Pathsalso maps the replacement.New Relic's docs content is CC BY-NC-SA 4.0, which is non-commercial and share-alike. The plugin reads the public page at runtime. For the rule that requires a saved copy, the test data is a 33-line excerpt: the section's two tables, which are mostly API and setting names, every line unchanged. It's marked "Excerpt for testing; © New Relic, CC BY-NC-SA 4.0", with what was left out stated, the way vendor documentation pages are handled here. Please confirm that's acceptable in this Apache-2.0 repo. If it isn't, the plugin can stay and the excerpt can be replaced or dropped.
Checklist
docs/plugins.md: new row (LayerSDK, statuslive),docs/plugins.jsonregenerated, README badge now 24. I compared the registered plugins with the table.plugins/removedmembers/testdata/golden/newrelic-11.0.0.json). The excerpt gives the same events as the full 136-line file.testdata/README.mdrow: the raw URL at the commit, date, license, quote, what was left out.LinkBase.providers/newrelic.mdfrom the template. Why this source covers the alternatives:deprecatedflags, and "deprecated after" descriptions that New Relic's own end-of-life notice contradicts for 10 of 12;env.Get.make checkpasses.Notes for the reviewer
An independent review checked every symbol against newrelic-python-agent at v10.17.0, v11.0.0 and v11.0.1.
🤖 Generated with Claude Code